Multithreading models in Operating System

About Multithreading in OS

On this page, we will learn the concepts of various multi-threading models in operating system. In multi-threading, multiple user threads can be created as many as required and the corresponding kernel threads run in parallel over multiprocessor machine.We will learn about the concepts and various types of multithreading. 

References in C++

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

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.
Many to one Model

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.
One to One Model

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.
Many to Many Model

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription