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
Why do we use thread in sleep?
Are threads as good as cores?
What is the difference between process and thread in linux?
What does thread mean in slang?
Is python a single thread?
What is the difference between user level thread and kernel level thread?
Does threading damage the skin?
Do threads share variables?
Why is threading bad for you?
How do I check my cpu threads?
How many goroutines are in a thread?
What are processes and threads?
How many threads can a cpu run?
What are the two types of threads?
What are the benefits of multithreading?