Multithreading models in Operating System (OS)

Multithreading Models in Operating System

In Operating Systems, where both User Level and kernel level thread exists, there exists a relationship between the two. User Level Thread is mapped to Kernel Level Thread by one of the 3 models –

  1. Many to One Model
  2. One to One Model
  3. Many To Many Model
Multithreading Models Types OS Operating System

Many To One Model

  • Many User Level Threads are mapped to one Kernel level Thread.
  • Does Not support parallel processing of threads in Multicore systems, Because only 1 thread can access kernel at a particular time.
  • If 1 thread makes a blocking call, then entire process will stop.
  • This is rarely used, mainly cause it does not support Multicore system.

One To One Model

  • Each of User thread is mapped to kernel thread.
  • Provides more concurrency.
  • Whole process does not gets blocked when 1 thread makes a blocking call as other threads can run.
  • Creates Overhead as every User thread requires to create the corresponding Kernel Thread for it.
  • Supports a particular number of thread only, cause of the overhead caused due to creation of Kernel Level Thread.
  • Implemented By Linux and Windows Operating System.

Many to Many Model

  • Multiple User Threads are multiplexed to same or less number of Kernel threads.
  • This is the best among the three models, as it improves on shortcoming of one to one model and many to one model.
  • We can create as number of User Threads as we want, unlike One to One Model.
  • There is no issue of process blocking and threads can run parallelly in multiprocess system unlike Many To One Model.

Please Login/Signup to comment