Benefits of threading on uni-processor PC?
>Can someone please tell me what the benefits >of threading are when the potential environment >is a main-stream uni-processor PC? The benefits are that you can interrupt the execution of some low priority task to quickly respond to something more important that needs immediate attention. That is the real time event processing benefit. Another benefit is that your program can do something while it is waiting for the completion of I/O. For example, if one of your threads hits a page fault, your program can nevertheless continue computing something else using another thread. Those are the two main benefits: decrease the overall running time by overlapping input/output operations with computation, and to control the response times to events through scheduling, prioritizing and preemption. The secondary benefit is that some problems are easy to express using concurrency which leads to elegant designs. >Concurrent execution and parallel execution are >2 different things. Adding the overhead