Say we have three threads T1, T2 and T3 which
perform sequentially one after another is their any benefit
of using thread over here rather than having a single
process.

Answer Posted / vinod

What if T1 waits for some resource -- Let it be some Input
from keyboard. When T1 is in the wait state, T2 and T3 can
be completed hence utilizing the waiting time. If it was a
single process instead of 3 threads, then the code
equivalent of T2 and T3 will have to wait till code
equivalent of T1 is completed which is definitely a waste of
time.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use thread in sleep?

425


Are threads as good as cores?

436


What is the difference between process and thread in linux?

422


What does thread mean in slang?

519


Is python a single thread?

430






What is the difference between user level thread and kernel level thread?

430


Does threading damage the skin?

432


Do threads share variables?

457


Why is threading bad for you?

430


How do I check my cpu threads?

406


How many goroutines are in a thread?

438


What are processes and threads?

430


How many threads can a cpu run?

394


What are the two types of threads?

471


What are the benefits of multithreading?

439