Threading Models in Operating Systems: Concepts, Mapping and Worked Examples
Learn how user threads map to kernel threads, why blocking behaves differently across models, and how to calculate execution capacity on four CPU cores.
KnowledgeGate Team
Exam prep & CS education

A process can contain several threads, but the user-thread count alone does not reveal how many can run in parallel or what happens when one blocks. Parallel execution depends on user threads, kernel threads and CPU cores, not on the user-thread count alone. Fork() creation, copy-on-write and the full process-versus-thread ownership boundary belong to Threads and Process Creation in OS: fork() Worked Examples. Mapping questions then use that boundary to calculate how M:1, 1:1 and fixed-pool M:N models limit execution before, during and after a blocking call.
Start from the process-thread distinction
A process is a running program with an address space and operating-system-managed resources. A thread is one execution path inside it, with a private program counter, register set and stack but access to shared process resources.
Thread creation or switching can avoid duplicating a whole address space, unlike fork()-based process creation. Exact costs are implementation-specific.
Two threads are concurrent when their execution overlaps in time. They are parallel only when they execute simultaneously on different cores. One core can interleave two runnable threads, creating concurrency but not physical parallelism.
Shared and private state: account for the memory once
Process P has 64 KiB of code, a 256 KiB heap, shared integer x = 10, and open file descriptor F. T1 has a 32 KiB stack and PC1 = 0x1040; T2 has a separate 32 KiB stack and PC2 = 0x2080.
State | Shared or private? | Explanation |
|---|---|---|
Code, | Shared | Both execute process code. |
Heap, | Shared | Both can access heap objects. |
| Shared | Both are process resources. |
Program counters and registers | Private | Each records one execution path. |
Two | Private | Each thread owns one stack. |
In this deliberately simplified accounting, the displayed memory is:
64 + 256 + 32 + 32 = 384 KiB
This excludes page tables, control blocks, kernel stacks and other runtime metadata.
Because x and file F are shared, concurrent access needs synchronization. A mapping model changes scheduling capacity; it does not make process resources thread-private.

User-level and kernel-level threads answer different questions
A user-level thread is scheduled by a user-space runtime or library. A kernel-level thread is known to and scheduled by the kernel. Implementations vary, but the distinction supports a clear textbook model.
User-space scheduling can let some operations avoid a kernel transition. Kernel-visible threads can be scheduled independently and across cores. Neither fact makes one approach universally faster.
Capacity equals the minimum of runnable user threads, unblocked kernel threads and CPU cores.
capacity = min(runnable user threads, unblocked kernel threads, CPU cores)
It gives maximum simultaneous application execution under the question's stated assumptions.
The three core threading models and the two-level variation
Model | Mapping | Possible multicore parallelism | Effect of one blocking kernel call under the stated textbook model | Main trade-off |
|---|---|---|---|---|
Many-to-one | Many user threads to one kernel thread | No | Blocking the sole kernel thread stops all its user threads | Simple management, one-core ceiling |
One-to-one | One kernel thread per user thread | Yes, up to other limits | Sibling threads can continue | More kernel-managed state |
Many-to-many | Many user threads over a kernel-thread pool | Yes, up to pool and core limits | A blocked fixed-pool member reduces capacity | Flexible, but pool management is complex |
In practice, a many-to-one runtime may use non-blocking facilities. That sits outside this textbook blocking-call calculation.
The two-level model is a many-to-many variation that permits a selected user thread to bind to one kernel thread. It is not one-to-one.
Worked example: eight user threads on four cores
The machine has four cores, C1-C4. Eight user threads, U1-U8, all have CPU work remaining.
M:1: all eight user threads map toK1.1:1:Uimaps toKi, givingK1-K8.Fixed-pool
M:N: all user threads shareK1-K3.
Then U4 begins a blocking kernel call lasting exactly 12 ms. Under M:N, it runs on K2, and no replacement kernel thread is created.
Before the block:
M:1 = min(8, 1, 4) = 1, limited by one kernel thread.1:1 = min(8, 8, 4) = 4, limited by four cores.M:N = min(8, 3, 4) = 3, limited by three kernel threads.
During the block:
M:1: blockedK1givesmin(7, 0, 4) = 0.1:1: onlyU4/K4is blocked, givingmin(7, 7, 4) = 4.M:N: blockedK2leavesK1andK3, givingmin(7, 2, 4) = 2.
After return, the ceilings become 1, 4 and 3 again if enough work remains.
Observed state |
|
| Fixed-pool |
|---|---|---|---|
Before | 1 | 4 | 3 |
During the | 0 | 4 | 2 |
After | 1 | 4 | 3 |
The rows are 1/4/3, 0/4/2, 1/4/3. A pool that can replace a blocked member may produce a different many-to-many answer, so use the stated assumption.

Benefits, costs and traps that change the answer
Threads can improve responsiveness, share process resources and use multiple cores when enough kernel-visible threads exist. More threads do not automatically make a program faster.
Costs include creation, scheduling, stacks, context switching, contention and harder debugging. Shared memory also requires synchronization.
Mapping controls where execution may occur. Synchronization controls whether concurrent access is correct. Process Synchronization and Semaphores develops the mutual-exclusion trace.
Common traps are confusing user and kernel threads, treating concurrency as parallelism, assuming eight threads use eight cores, generalising blocking without naming the mapping, and ignoring whether the pool is fixed.
How competitive exams test threading models
Questions may ask you to classify state, recognise a mapping, calculate simultaneous execution, reason about blocking, or compare creation overhead qualitatively.
Quick drill: 10 user threads, 3 unblocked kernel threads and 6 cores. Name the bottleneck, then calculate min(10, 3, 6) = 3. If one fixed kernel thread blocks with no replacement, capacity becomes min(9, 2, 6) = 2. Kernel threads are the bottleneck both times.
Practise mapping and blocking questions with Threads and Process Creation MCQs for GATE OS, then place the lesson within the GATE CS exam preparation subject map.
Short version and next step
A thread owns execution state but shares its process resources.
User-thread and kernel-thread counts are not necessarily equal.
CPU cores impose the final physical ceiling on parallel execution.
Blocking behaviour depends on the mapping and the stated assumptions.
Use min(runnable U, unblocked K, cores) as a reasoning aid, not a universal operating-system API guarantee. Redraw the example and recompute all three rows. Then change the fixed pool from 3 to 4 kernel threads: M:N becomes 4, 3, 4.
For a wider guided path, continue with GATE Guidance by Sanchit Sir and place this model alongside scheduling, process creation and synchronization.
Keep learning
Threading Models MCQs: 12 Solved Operating System Questions with Explanations
Test the boundaries between shared process resources and private thread state through 12 solved PYQs, then revise mapping models, switching and hyper-threading.
Threads and Process Creation in Operating Systems: fork(), Thread Models and Worked Examples
Build a reliable model of processes and threads, then trace conditional fork() calls across six named process paths without losing track of return values.
RGB, CMY, HSV and HLS Color Models: Conversions, Geometry and Worked Examples
Follow RGB (64,128,192) through ideal CMY, HSV and HLS, then reverse both cylindrical models. Includes formulas, boundary cases and exam traps.
Fuzzy Systems and Inference Models: Membership Functions, Mamdani vs Sugeno, and a Worked Example
Learn how a fuzzy inference system turns crisp inputs into one useful output. Compare Mamdani, Sugeno, and Tsukamoto, then calculate a four-rule fan controller step by step.





