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

What is the difference between process and thread in linux?

430


What are the advantages of threads?

476


What is difference between thread and runnable?

449


how will you distinguish if it is a process or a thread, provided you know pid in linux operating system?

475


Can threading damage skin?

456






What are the process states in linux?

387


What are the two methods to create threads?

415


What are the differences between user level threads and kernel threads?

416


Is it better to have more cores or more threads?

478


Are more threads better?

430


Why do we need multithreading?

507


Do threads get their own pid?

458


Can two threads share the same stack?

395


What are the advantages of threads over processes?

457


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

435