Threads-User Space, Kernel Space, Hybrid
Threads-User Space, Kernel Space, Hybrid
There are three main approaches to implementing threads: user space, kernel
space, and a hybrid combination of both.
In this approach, the entire threads package resides in user space, without any
direct involvement from the operating system kernel.
advantages:
Disadvantages:
• If one user-level thread blocks (e.g., due to I/O), it blocks all threads within
the process.
• Since user-level threads are managed by the runtime system, they don’t
take full advantage of multiple processors.
2. Implementation of threads in Kernel Space
In this approach, thread management is directly handled by the operating system
kernel.
Advantages:
Disadvantages:
3. Hybrid Implementations:
These combine elements of both user space and kernel space threads.
In summary, the choice between user space and kernel space threads depends on
trade-offs related to lightweight ness, parallelism, and control. Hybrid approaches
aim to strike a balance between these factors.