Multithreading in OS Different Models (original) (raw)

Last Updated : 5 Mar, 2026

Multithreading is a technique where a process is divided into smaller execution units called threads that run concurrently.

How are User Threads Mapped with Kernel Threads?

Multithreading model are of three types.

Many to Many Model

In this model, we have multiple user threads multiplex to same or lesser number of kernel level threads. Number of kernel level threads are specific to the machine, advantage of this model is if a user thread is blocked we can schedule others user thread to other kernel thread. Thus, System doesn't block if a particular thread is blocked.
It is the best multi threading model.

many_to_many_multithreading_model

Many-to-Many Multithreading Model

Many to One Model

In this model, we have multiple user threads mapped to one kernel thread. In this model when a user thread makes a blocking system call entire process blocks. As we have only one kernel thread and only one user thread can access kernel at a time, so multiple threads are not able access multiprocessor at the same time.

The thread management is done on the user level so it is more efficient.

many_to_one_multithreading_model

Many-to-Many Multithreading Model

One to One Model

In this model, one to one relationship between kernel and user thread. In this model multiple thread can run on multiple processor. Problem with this model is that creating a user thread requires the corresponding kernel thread.

As each user thread is connected to different kernel , if any user thread makes a blocking system call, the other user threads won't be blocked.

one_to_one_multithreading_model

One-to-One Multithreading Model

Which of the above Model is used in Practice?

One to one This model is usually preferred because:

  1. **True Parallelism: Since each user thread is backed by a kernel thread, the operating system can schedule them on multiple CPUs/cores at the same time. This means multiple threads from the same process can actually run in parallel, unlike the many-to-one model (where all user threads run on a single kernel thread).
  2. **Blocking System Calls Don’t Stop Others: In the many-to-one model, if one user thread makes a blocking system call (like waiting for I/O), the whole process is stuck. In the one-to-one model, only that thread blocks; other threads of the same process keep running.
  3. **Better Utilization of Multiprocessor Systems: Modern systems are multicore. One-to-one allows full usage of available cores, which improves performance.
  4. **OS Support and Management: The operating system manages kernel threads directly, so scheduling, context switching, and resource allocation are efficient and handled at the kernel level.

Is Multithreading Possible Without OS Support?

Applications

1. Transaction Processing

2. Web and Internet Applications

3. Banking & Financial Systems

4. Telecom & Recharge Services