/    /  OS – multithreading

Multithreading in OS

 

What is multithreading?

 

Multithreading is the ability of the CPU to provide multiple threads of execution simultaneously. And a thread is the path followed by the program during execution. 

Multithreading increases the utilization of a single core by using thread-level parallelism and instruction-level parallelism. The two techniques are complementary and are combined in nearly all modern systems architectures with multiple multithreading CPUs.

 

What is multithreading used for?

 

Most of the applications we use have multiple threads running in the background, for example, in our internet browser, multiple threads of execution are used to load data, play videos, etc.

An important reason for incorporating multiple threads in our system is to increase the quality of the performance.

 

Multiple ways in which it is used are as follows:

  1. In a ray-tracing application, multiple threads are used to compute visual effects.
  2. In a web browser, it is used to concurrently process requests of data.

 

Multithreading helps in the efficient use of computer resources as it is less resource-intensive than running multiple processors at the same time. 

 

Disadvantages of multithreading:

 

The disadvantages of multithreading are as follows:

  1. Multiple threads may interfere with each other while sharing hardware resources.
  2. The hardware support for multithreading is more visible to the software and hence it needs more changes to the OS and the application programs than multiprocessing.

 

Reference:

Multithreading of Operating system.