- Asked 2/19
- 2070 Bhadra · 3 marks
- 2075 Baisakh · 3 marks
User-level versus kernel-level threads
Short answer
User-level threads are managed by a library in user space; creation is fast but a blocking call halts the entire process. Kernel-level threads are scheduled by the OS, support true parallelism on multicores, but operations involve higher overhead due to system calls.
Define threads and differentiate between user-level threads and kernel-level threads.
A thread is a lightweight unit of execution within a process: it has its own program counter, registers and stack but shares the code, data and resources of the process with its sibling threads.
| Point | User-level thread | Kernel-level thread |
|---|---|---|
| Managed by | User thread library in user space | The operating system kernel |
| Kernel awareness | Kernel sees only one process | Kernel knows and schedules each thread |
| Creation / switch | Fast (no system call) | Slower (system call, kernel work) |
| Blocking | One blocking call blocks the whole process | Other threads continue to run |
| Multiprocessor | Cannot run threads in parallel on several CPUs | Can run on different CPUs in parallel |
| Scheduling | By the library, application-specific | By the kernel scheduler |
| Portability | Easy; runs on any OS | OS dependent |
| Overhead | Low | Higher |
| Examples | Green threads (early Java), GNU Portable Threads | Windows threads, Linux threads (including Pthreads on Linux) |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Kernel and its types · Embedded System, chapter 6 · asked 2×
- Open loop versus closed loop control · Embedded System, chapter 7 · asked 6×
- RTOS versus general-purpose OS · Embedded System, chapter 6 · asked 4×
- Process versus thread differences · Embedded System, chapter 6 · asked 4×
- Embedded versus non-embedded systems · Embedded System, chapter 1
- Super scalar versus VLIW architecture · Embedded System, chapter 2
- Process vs thread; user and kernel threads · Operating System, chapter 2
- Waterfall versus spiral; user participation · Software Engineering, chapter 1
- Switch versus user defined function · Computer Programming, chapter 5
- Process vs threads; importance in DS · Distributed System, chapter 3 · asked 3×