Multi-Threading Models

Multithreading allows the execution of multiple parts of a program at the same time. These parts are known as threads and are lightweight processes available within the process. Therefore, multithreading leads to maximum utilization of the CPU by multitasking.

The main models for multithreading are one-to-one model, many-to-one model, and many-to-many model. Each model defines how user-level threads are mapped to kernel-level threads, affecting performance and system behavior.

One-to-One Model

The one-to-one model maps each user thread to a kernel thread. This means that many threads can run in parallel on multiprocessors and other threads can run when one thread makes a blocking system call.

One-to-One Model User Threads Kernel Threads U1 U2 U3 K1 K2 K3 1:1 Mapping

A disadvantage of the one-to-one model is that the creation of a user thread requires a corresponding kernel thread. Since a lot of kernel threads burden the system, there is restriction on the number of threads in the system.

Many-to-One Model

The many-to-one model maps many user threads to a single kernel thread. This model is quite efficient as the user space manages the thread management.

Many-to-One Model User Threads Kernel Thread U1 U2 U3 U4 U5 K1 Many:1 Mapping

A disadvantage of the many-to-one model is that a thread blocking system call blocks the entire process. Also, multiple threads cannot run in parallel as only one thread can access the kernel at a time.

Many-to-Many Model

The many-to-many model maps many user threads to an equal number or fewer kernel threads. The number of kernel threads depends on the application or machine.

Many-to-Many Model User Threads Kernel Threads U1 U2 U3 U4 U5 U6 K1 K2 K3 M:N Mapping (Dynamic)

The many-to-many model does not have the disadvantages of the one-to-one model or the many-to-one model. There can be as many user threads as required and their corresponding kernel threads can run in parallel on a multiprocessor.

Comparison

Model Advantages Disadvantages Use Cases
One-to-One True parallelism, blocking calls don't affect other threads High kernel thread overhead, limited scalability
Updated on: 2026-03-17T09:01:38+05:30

23K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements