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
What does threads mean when downloading?
How do I check my cpu threads?
Can a process have 0 threads?
is there a command line shortcut to the login directory
Can one thread run on multiple cores?
Is python a single thread?
Explain each system calls used for process management in linux.
Why are threads expensive?
How many threads can one core handle?
What is a thread in email?
Why do we use thread in sleep?
Does thread count matter cpu?
Whats the difference between a thread and a process?
What are the advantages of threads over processes?
What is thread explain the threads in linux?