what are the advantages of multi threading


What are the advantages of multi threading? 

Multithreading a code can have several advantages.

  • Improve application responsiveness --Any program in which various activities are not dependent upon each other can be redesigned so that each activity is defined as a thread. For instance, the user of a multithreaded GUI doesn't have to wait for one activity to complete before starting another.
  • Use multiprocessors more efficiently -- usually, applications that articulate concurrency requirements with threads need not to take into account the number of available processors. The performance of the application enhances transparently with additional processors. Numerical applications and algorithms with a high degree of parallelism, for instance matrix multiplications, are able to run much faster when implemented with threads on a multiprocessor.
  • Improve program structure -- several programs are more efficiently structured as semi-independent or multiple independent units of execution instead of as a single monolithic thread. Multithreaded programs are able to be more adaptive to variations in user demands than single threaded programs.
  • Use fewer system resources -- Programs that utilizes two or more processes that access common data by means of shared memory are applying more than one thread of control. Though, every process has a full address space and operating systems state. The cost of maintaining and creating this huge amount of state information makes each process a lot more expensive than a thread in both time and space. Additionally, the inherent separation among processes is able to require a major effort by the programmer to communicate between the threads in different processes or to synchronize their actions.

 

Request for Solution File

Ask an Expert for Answer!!
Operating System: what are the advantages of multi threading
Reference No:- TGS0307840

Expected delivery within 24 Hours