N/APosted on - 11/08/2011
Can anyone explain why a multithreaded program with one to one mapping between user level and kernel level thread performs faster than a single threaded multiprocessor machine? Is it because it allows blocking one or more system calls and enabling the smooth running of other threads? Please elaborate.
Why multithread program are faster than a single threaded multiprocessor machine
A multiple threaded program will tend to perform faster compared to a single threaded program because of the following reasons:
There is improved responsiveness which is most likely due many operations being put a separate thread that allows the application to continue to be responsive to the user.
Faster application — for instance calculations or processing of files are made faster since many multiple operations are executed by the system at the same time
Prioritization, whereby the threads are assigned according to the level of importance hence allowing higher priority tasks to take precedence over lower priority tasks.
Single threaded on the other hand allows only one thread within the process and which does all the work for the process. The process is required to stop so that current execution of the thread finishes for another task to be performed. These results into idle time and which may cause user frustration for the processes may be taking too long to execute.