---
title: "Process vs thread; user and kernel threads"
subject: "Operating System"
chapter: 2
key: "semester_6/operating_system:process-vs-thread-user-kernel-threads"
source: https://www.bctengineer.com/q/semester_6/operating_system/process-vs-thread-user-kernel-threads
site: BCT Engineering
---

# Process vs thread; user and kernel threads

Operating System · Chapter 2: Process Management

- Asked in: year not given
- Video: [L-1.12: User Level Vs Kernel Level Thread in Operating System | All Imp Points](https://www.youtube.com/watch?v=-NONm-Jq34Y) — Gate Smashers
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/operating_system/process-vs-thread-user-kernel-threads
- Whole chapter: https://www.bctengineer.com/md/semester_6/operating_system/chapter-2

## Question

What do you mean by process and thread? Discuss the advantages of user level thread and kernel level thread.

## Short answer

A process is a program in execution with its own address space; a thread is a lightweight unit within a process sharing resources. User-level threads are fast and kernel-agnostic but cannot exploit multiple CPUs; kernel-level threads allow true parallelism and handle blocking better but have higher overhead.

## Answer

#### Process and thread

A **process** is a program in execution, with its own address space, resources and process control block. A **thread** is a lightweight unit of execution within a process; it has its own program counter, registers and stack but shares code, data and files with other threads of the same process.

| Basis | Process | Thread |
|---|---|---|
| Weight | Heavy | Light |
| Address space | Separate | Shared |
| Creation/switch cost | High | Low |
| Communication | Via IPC | Via shared memory |
| Protection | Isolated | Not isolated |

#### User-level threads (ULT)

Threads are created and managed by a user-space library; the kernel knows only the process.

Advantages:
- Fast creation and switching: no kernel trap, only a library call.
- Can run on an OS that does not support threads.
- Each process can use its own scheduling algorithm.
- Scale well to a very large number of threads (no kernel table space).

Disadvantage: a blocking system call by one thread blocks the whole process, and threads cannot run on several CPUs at once.

#### Kernel-level threads (KLT)

Threads are managed by the kernel, which keeps a thread table.

Advantages:
- The kernel can schedule threads of one process on **different CPUs** at once (true parallelism).
- If one thread blocks, the kernel can run another thread of the same process.
- The kernel can give more CPU time to processes with many threads and can handle thread-level scheduling and signals.

Disadvantage: slower to create and switch (system calls and mode switches), and uses kernel memory.

Hybrid (many-to-many) models, as in Solaris, combine both.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which resources are private to each thread, while code, data and files are shared with other threads of the same process?
   A. Program counter, registers and stack
   B. Address space and open files
   C. Code segment and heap
   D. Process control block and page table
   Answer: A. Each thread has its own program counter, registers and stack; code, data and files are shared within the process. (Key point: Thread vs process resources)

2. How do threads of one process usually communicate, compared with separate processes?
   A. Both need IPC such as pipes
   B. Threads use shared memory; processes need IPC
   C. Threads need IPC; processes use shared memory
   D. Threads cannot communicate at all
   Answer: B. Threads share the address space so they use shared memory directly, whereas processes are isolated and need IPC. (Key point: Process vs thread communication)

3. Why are user-level threads fast to create and switch?
   A. The kernel keeps a thread table for them
   B. They run on several CPUs at once
   C. Managed by a library, so no kernel trap is needed
   D. They are isolated in separate address spaces
   Answer: C. ULT switching is only a library call in user space, with no system call or mode switch. (Key point: ULT advantage)

4. What can kernel-level threads do that user-level threads cannot?
   A. Run on an OS with no thread support
   B. Use a custom scheduling algorithm per process
   C. Be created without any system call
   D. Run threads of one process on different CPUs at the same time and keep running others when one blocks
   Answer: D. The kernel knows each thread, so it can schedule them on different CPUs and run another thread when one blocks. (Key point: KLT advantage over ULT)

## Related in Operating System

- [Process vs thread; multithreading advantages](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aprocess-thread-multithreading) — Operating System, chapter 2
- [What is process; process vs thread](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aprocess-vs-thread-define) — Operating System, chapter 2
- [Process vs thread; context switching](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Athread-context-switching) — Operating System, chapter 2
- [Monolithic vs micro-kernel structure](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Amonolithic-vs-microkernel) — Operating System, chapter 1
- [Device controller vs kernel; DMA](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Adevice-controller-vs-kernel-dma) — Operating System, chapter 6
- [System administration; special vs general user](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Asysadmin-special-vs-general-user) — Operating System, chapter 9

## Related in other subjects

- [User-level versus kernel-level threads](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Auser-vs-kernel-threads) — Embedded System, chapter 6, asked 2×
- [Instruction, thread, process level parallelism](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Ainstruction-thread-process-parallelism) — Microprocessor, chapter 6
- [Process vs threads; importance in DS](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aprocess-vs-thread) — Distributed System, chapter 3, asked 3×
- [Process vs thread and task states](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Aprocess-thread-and-task-states) — Embedded System, chapter 6
