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
Can we start two threads at a time?
Why are threads expensive?
What do cores and threads mean?
Is python a single thread?
Are cpu threads important?
Why do we need thread pool?
What is the difference between process and thread in linux?
What does threads mean when downloading?
What are the advantages of threads?
Why thread is faster than process?
What do cpu threads do?
Do threads get their own pid?
Can two threads execute at the same time?
What are threads and processes?
Can threading cause hair to grow back thicker?