Pure User-Managed Threads

User-managed threads are purely managed in userspace where the kernel is completely unaware of these multiple threads. The process itself manages all threads, typically through libraries, while the kernel treats everything as a single process.

Advantages of User-Managed Threads

Fast Context Switching:

Context switching between user-managed threads is extremely fast because no process switching is required—only thread switching within the same process. No mode switch from user space to kernel space is needed, unlike kernel threads which require costly system calls.

Quick Creation and Termination:

User-managed threads are fast to create and terminate since they run entirely in user space with no system call involvement. No mode switching between user and kernel modes is required.

Operating System Independence:

These threads can run on operating systems that don't even support multithreading, since from the kernel's perspective, there's just a single kernel-level process managing all user threads internally.

Disadvantages of User-Managed Threads

Blocking Issues:

If one user thread makes a blocking system call, it blocks the entire process because the kernel considers everything as a single process. Other threads cannot run when one thread is blocked, since the kernel is unaware of the multiple threads.

No Multi-core Advantage:

User-managed threads cannot take advantage of multi-core or multiprocessor systems. Even if other processors are idle, multiple threads can only run on a single processing unit because one process is scheduled by the operating system on only one processor at a time. These threads can only run in concurrent mode (when one thread does I/O, another can utilize CPU) but not on multiple processors simultaneously.


Pure Kernel-Managed Threads

Kernel-managed threads are purely managed in kernel space where the kernel is fully aware of and manages each thread individually.

Advantages of Kernel-Managed Threads

No Blocking Impact:

When one kernel thread makes a blocking system call, it blocks only itself without impacting other threads. The kernel manages each thread independently.