Benefits of having multiple threads of execution:
-
For a large class of applications it is much easier to express a program control flow by concurrent actions than by the finite automaton model.
-
On multiprocessor systems, multiple threads can run in parallel thus speeding up the application execution.
-
Using multiple threads, an application can take an advantage of overlapping between IO and CPU operations (CPU and IO channels can operate concurrently because of different hardware circuitry).
-
Multithreading can mask a large percentage of latency incurred during memory and IO operations.
|