Advantages of Multithreading:
Some advantages using multithreading are as follows:
1. Responsiveness:
Multithreading approach increases responsiveness of the process. As a process
consists of more than one thread, if one thread is blocked or busy in a lengthy
calculation, some other thread may still be executing. So the user gets more
response from the executing process. For example, a browser allows a user to
interact with it while a file is being downloaded.
2. Resource Sharing:
All threads of one process share the memory and resources of that process.
Secondly it allows an application to have several different threads within the
same address space.
3. Economy:
Allocation of memory and resources for process creation is costly. All threads
of a process share the resources of that process so it is more economical to
create and context switch the thread.
4. Utilization of Multiprocessor Architecture:
Multiprocessor architecture allows the facility of parallel processing. It is
most efficient way of processing. A single threaded process can be executed on
one CPU even if we have more processors. Multithreading on a multiprocessor
system increases concurrency. Different parts of a multi-threaded process can be
executed simultaneously on different processors.
|