🎓 BookMCQ
← Back to 4. Threads in Operating System

📝 Multithreading models in operating system (33 MCQs)

Mapping User Threads to Kernel Threads

Multithreading models describe how user-level threads created by an application are associated with kernel-supported threads that the operating system schedules. This mapping determines how many application threads can execute simultaneously, how blocking operations affect other threads, and where scheduling responsibilities are performed. The principal textbook models are many-to-one, one-to-one, and many-to-many, each offering different concurrency and management trade-offs.

Why Thread Mapping Affects Concurrency and Blocking

Applications require convenient thread creation and management, while the kernel must coordinate processor execution and hardware resources. User-level thread management can be efficient, but it may not provide independent kernel scheduling for every thread. Mapping models address the relationship between these requirements, balancing management overhead against parallel execution and blocking behaviour.

Many-to-One, One-to-One, and Many-to-Many Organisation

Many-to-one maps several user threads to one kernel thread, so only one mapped execution stream can run at a time. One-to-one provides a kernel thread for each user thread. Many-to-many multiplexes multiple user threads over a smaller or equal number of kernel-supported execution entities, allowing flexible mapping and parallelism.

Mapping Twelve User Threads to Available Kernel Threads

Suppose an application creates 12 user threads. A many-to-one model maps them to one kernel thread, preventing simultaneous execution. A one-to-one model requires 12 kernel threads. A many-to-many model might multiplex the 12 user threads over four kernel threads, allowing up to four threads to execute simultaneously on four available cores.

Parallelism, Blocking Behaviour, and Resource Overhead

One-to-one provides straightforward kernel scheduling and multicore utilisation but may create considerable kernel-thread overhead. Many-to-one keeps kernel management smaller but restricts parallelism and can suffer from blocking limitations. Many-to-many offers flexible multiplexing but requires more sophisticated runtime and kernel coordination. Actual operating systems may use implementation-specific designs rather than textbook mappings.

Misconceptions About User and Kernel Thread Counts

'Many-to-one supports simultaneous execution on several cores' is incorrect because its threads share one kernel execution entity. 'One-to-one always provides the best performance' is incorrect because additional kernel threads consume resources. 'Many-to-many requires fewer user threads than kernel threads' is incorrect because it normally multiplexes multiple user threads over kernel execution entities.

Exam Focus: Thread Mapping Diagrams and Model Comparison

Draw the three mapping models and identify the number of user and kernel threads in each. Compare blocking behaviour, kernel overhead, and multicore parallelism. Given 20 user threads and four kernel threads, determine which model can multiplex the workload. Questions may also examine why many-to-one cannot exploit multiple cores simultaneously.

Key Terms of Multithreading Models

  • User thread - Thread managed at application level.
  • Kernel thread - Thread managed by the kernel.
  • Many-to-one - Many user threads mapped to one kernel thread.
  • One-to-one - Each user thread has a kernel thread.
  • Many-to-many - Multiple user threads multiplexed over kernel threads.
  • Multiplexing - Sharing execution entities among threads.
11
Easy
11
Medium
11
Hard

📝 All Multithreading models in operating system MCQs

Q1. What is the fundamental relationship described by a multithreading model?

A.How user-level threads are mapped to kernel-level threads ✅
B.How processes are mapped to physical memory frames
C.How CPU cores are connected to cache levels
D.How files are assigned to disk cylinders
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A user thread is managed by an application-level thread library or runtime, whereas a kernel thread is represented and scheduled by the operating system. Mapping models describe how these two execution entities correspond.

Q2. A runtime creates several user threads but maps all of them to one kernel thread. Which model is being used?

A.One-to-one
B.Many-to-many
C.Many-to-one ✅
D.Two-level
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: Many-to-one associates multiple user threads with a single kernel thread. The runtime can switch among user threads, but the kernel sees only one schedulable execution path for that process at a time.

Q3. An application creates nine user threads, and the operating system maintains nine corresponding kernel threads. Which mapping does this represent?

A.Many-to-one
B.One-to-one ✅
C.Many-to-many
D.Two-level only
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: In one-to-one mapping, each user thread has a corresponding kernel thread. This gives the operating system an independently schedulable entity for each user thread, subject to system resource limits and policies.

Q4. A runtime multiplexes 12 user threads over three kernel threads. Assuming enough processor cores and runnable work, what is the maximum number of these user threads that can execute simultaneously?

A.Twelve
B.Six
C.One
D.Three ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: Twelve user threads mapped onto three kernel threads provide at most three simultaneous execution paths. The remaining user threads must await scheduling onto an available kernel thread, even if more user tasks exist.

Q5. A runtime allows many user threads to share a kernel-thread pool but permanently associates one selected user thread with a particular kernel thread. Which model supports this arrangement?

A.Two-level ✅
B.Many-to-one
C.Strict one-to-one
D.Single-threaded
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The two-level model retains many-to-many multiplexing while allowing selected user threads to be bound to particular kernel threads. It therefore combines flexible sharing with dedicated mappings for chosen threads when required.

Q6. A user thread in a many-to-one process makes a blocking system call that blocks the only underlying kernel thread. A student expects the other user threads to continue on that same kernel thread. What is the error?

A.The runtime should create a new process for each waiting thread
B.Other user threads have no independent kernel execution path while the shared kernel thread is blocked ✅
C.A blocking call affects only the user-level scheduler and never the kernel thread
D.The processor automatically converts the mapping to many-to-many
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The flawed assumption is that other user threads can use the same blocked kernel thread. In many-to-one, blocking that single kernel thread can stop progress for all user threads mapped to it.

Q7. A many-to-one runtime switches among user threads very frequently. A student concludes that the threads therefore execute in parallel on separate cores. Which correction is accurate?

A.Frequent switching creates a separate kernel thread for each user thread
B.Parallelism is guaranteed whenever user threads outnumber cores
C.Switching can provide concurrency through interleaving, but one shared kernel thread cannot execute on two cores simultaneously ✅
D.The model becomes one-to-one whenever the runtime preempts a user thread
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: Frequent switching by a user-level runtime can interleave threads and provide concurrency, but it does not create another kernel execution path. One shared kernel thread still cannot run on two cores simultaneously.

Q8. A process uses one-to-one mapping. One user thread blocks while reading a file, and three other user threads have independent CPU work ready. What can the operating system do?

A.It must stop the entire process until the read finishes
B.It converts the process to many-to-one mapping
C.It resumes the blocked thread without waiting for the file
D.It can schedule the other threads through their separate kernel threads ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: In one-to-one mapping, the blocked user thread's kernel thread waits for the disk operation. Other user threads have separate kernel threads, so the scheduler can run them if they are ready and processors are available.

Q9. A server uses one-to-one mapping for thousands of user threads, many of which remain idle. Which cost deserves particular attention?

A.Kernel memory and management overhead from maintaining many kernel threads ✅
B.The inability to schedule any thread independently
C.The requirement that every thread share one kernel thread
D.The inability to use multiple processor cores
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: One-to-one mapping creates a kernel thread for every user thread. This supports independent kernel scheduling and multicore execution, but large thread populations can consume more kernel memory and increase management overhead.

Q10. A developer claims that a many-to-many implementation performs all scheduling in user space, so the kernel does not schedule any threads. What is missing from this explanation?

A.The kernel schedules user threads directly without kernel-thread entities
B.The kernel still schedules the kernel threads, while the runtime maps user threads onto those execution paths ✅
C.Many-to-many models do not use a user-level runtime
D.The processor chooses user threads without either scheduler
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The runtime selects user threads for available kernel execution paths, but the operating system still schedules kernel threads on processors. Many-to-many therefore involves coordination between user-level mapping decisions and kernel scheduling.

Q11. An application has 18 runnable user threads mapped onto five kernel threads and runs on eight available cores. Assuming each kernel thread can execute one user thread at a time, what is the maximum simultaneous execution count?

A.Eight
B.Eighteen
C.Five ✅
D.One
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The five kernel threads provide only five independent execution paths, even though eight cores and eighteen user threads exist. Therefore, the maximum simultaneous execution count is limited to five under the stated assumptions.

Q12. A many-to-many process has four kernel threads. One user thread blocks on a call using one kernel thread, while other user threads remain runnable. What is the most accurate expectation?

A.Every user thread must stop until the blocked call completes
B.The blocked user thread continues executing on another core
C.The runtime automatically creates one kernel thread per remaining user thread
D.Other runnable user threads may use the remaining kernel threads if the runtime and mapping permit ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: A blocking call occupies the kernel thread carrying that user thread, but it need not stop the entire process. Other user threads can progress when remaining kernel execution paths are available and the runtime schedules them.

Q13. A graph plots user-thread count U against kernel-thread count K for a mapping with these points: (1,1) ; (3,1) ; (5,1) ; (8,1) ; (12,1). Which model does the constant kernel-thread count represent?

A.Many-to-one ✅
B.One-to-one
C.Many-to-many with an increasing kernel pool
D.Two-level with every user thread bound separately
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The plotted values keep K equal to one while U increases from one to twelve. Multiple user threads therefore share a single kernel thread, which is the defining mapping pattern of many-to-one.

Q14. A graph contains these user-thread and kernel-thread pairs: (1,1) ; (2,2) ; (3,3) ; (4,4) ; (6,6). Which mapping is represented by the straight-line relationship?

A.Many-to-one
B.One-to-one ✅
C.Many-to-many with a fixed kernel pool
D.Two-level with selective binding
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Each plotted pair has equal user-thread and kernel-thread counts, so the relationship follows K = U. This is the numerical pattern of one-to-one mapping, where every user thread has its own kernel thread.

Q15. A many-to-many runtime limits its kernel-thread pool to four. Its graph gives these points: (1,1) ; (2,2) ; (4,4) ; (7,4) ; (10,4). How many kernel threads are associated with ten user threads?

A.Ten
B.Seven
C.Four ✅
D.One
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The plotted relationship increases until the pool reaches four kernel threads, then remains constant. At U = 10, the graph gives K = 4, so ten user threads are multiplexed over four kernel execution paths.

Q16. A two-level runtime has ten user threads and four kernel threads. One user thread is bound to a particular kernel thread, while the remaining user threads share the other kernel threads. What feature distinguishes this model?

A.Every user thread must have a separate dedicated core
B.All user threads must map to one kernel thread
C.The kernel is prevented from scheduling any threads
D.Selective binding is combined with multiplexing of other user threads ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: The two-level model combines a many-to-many arrangement with selective binding. One chosen user thread can retain a particular kernel thread, while other user threads continue to be multiplexed over the remaining kernel execution paths.

Q17. A student sees 20 user threads and four kernel threads and labels the mapping one-to-one because the operating system schedules all four kernel threads. What is the mistake?

A.One-to-one requires one kernel thread per user thread; the stated counts instead indicate multiplexing ✅
B.One-to-one always uses exactly four kernel threads
C.Many-to-many cannot have fewer kernel threads than user threads
D.Kernel threads are not scheduled by the operating system
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The incorrect step is equating kernel scheduling with one-to-one mapping. One-to-one requires matching user and kernel thread counts; twenty user threads sharing four kernel threads indicate a many-to-many arrangement in this case.

Q18. Which entity is directly selected by the operating system's kernel scheduler for execution on a processor in these mapping models?

A.A user-level thread that is invisible to the kernel
B.A kernel thread ✅
C.A source-code function
D.A process variable
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The kernel scheduler selects kernel threads as its schedulable execution entities. User-level runtimes may decide which user thread occupies a kernel thread, but processor scheduling is performed by the operating system.

Q19. A service must support a very large number of logical user threads while keeping the kernel-thread count lower. Which trade-off most accurately describes many-to-many mapping compared with one-to-one?

A.It removes all scheduling overhead and guarantees better performance
B.It prevents execution on multiple cores
C.It can reduce kernel-thread resource use but requires more complex coordination between runtime and kernel scheduling ✅
D.It requires one kernel thread for every user thread
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Many-to-many can multiplex numerous user threads over fewer kernel threads, reducing kernel resource use. Its cost is greater implementation complexity because user-level mapping and kernel scheduling must coordinate effectively across both levels.

Q20. A program has seven user threads mapped to one kernel thread and runs on a machine with four cores. The developer expects four user threads to execute simultaneously. Which result is possible through this mapping?

A.Four threads execute simultaneously because four cores exist
B.Seven threads execute simultaneously through rapid user-level switching
C.Two threads execute simultaneously if they have different priorities
D.Only one user thread can execute at an instant through the single kernel execution path ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: The four physical cores cannot overcome the single kernel-thread mapping. The runtime may interleave seven user threads, but only one mapped execution path can occupy a processor at any instant through this model.

Q21. A one-to-one process has nine user threads. One thread blocks on input, while the other eight are runnable and independent. If at least eight cores are available, how many can potentially execute simultaneously?

A.Eight ✅
B.Nine
C.One
D.Zero
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The blocked thread cannot execute until its input arrives, but the other eight have independent kernel threads and runnable work. With eight available cores and no dependencies, all eight may execute simultaneously.

Q22. A student says a many-to-many model guarantees that blocking one user thread never affects other user threads. What qualification is missing?

A.Blocking always terminates every kernel thread
B.Other threads can progress only if an execution path is available and the runtime can schedule them appropriately ✅
C.Many-to-many has no kernel threads to block
D.A blocked user thread automatically creates additional processor cores
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The claim is too absolute. A blocked user thread ties up its mapped kernel execution path; other threads can continue only when another path is available and the runtime can assign runnable work to it.

Q23. A process has 12 user threads mapped over three kernel threads. One user thread is blocked, and four processor cores are available. Assuming each kernel thread carries at most one user thread at a time, what is the maximum number that can execute simultaneously?

A.Twelve
B.Four
C.Two ✅
D.One
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The blocking call occupies one of the three kernel threads, leaving two independent execution paths for other user threads. Four available cores cannot increase that limit, so at most two other runnable threads can execute.

Q24. A workload needs thousands of user threads, several kernel execution paths for multicore work, and a dedicated kernel thread for one latency-sensitive user thread. Which model best fits all three requirements?

A.Many-to-one
B.Strict one-to-one for every user thread
C.A single user thread with cooperative switching
D.Two-level mapping with selective binding and multiplexing ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: Two-level mapping supports many user threads over a kernel-thread pool while allowing selected threads to be bound. This meets the stated combination of many logical threads, parallel execution paths, and dedicated treatment for one selected thread.

Q25. A two-level runtime has 14 user threads mapped to five kernel threads. One user thread is bound to one kernel thread, and the rest share the remaining pool. If three cores are available and enough user threads are runnable, what is the maximum simultaneous execution count?

A.Three ✅
B.Five
C.Fourteen
D.One
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Five kernel threads offer up to five execution paths, but only three processor cores are available. The maximum is therefore the smaller value, three, assuming sufficient runnable work and no other restrictions.

Q26. A server creates thousands of user threads using one-to-one mapping. A student argues that this has no additional kernel cost because user threads are lightweight. What is the flaw?

A.One-to-one maps all user threads to one kernel thread
B.Each user thread has a corresponding kernel thread, so kernel memory and management costs can grow with thread count ✅
C.Kernel threads do not require scheduling information
D.The operating system ignores user threads in one-to-one mapping
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The student overlooks the one-to-one correspondence: each user thread requires a kernel thread. Large populations therefore increase kernel-managed thread state and scheduling work, even though each thread shares its process address space.

Q27. A design maps 60 user threads onto six kernel threads. Which model is the most direct description of the relationship?

A.One-to-one
B.Many-to-one
C.Many-to-many ✅
D.Strictly single-threaded
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: Sixty user threads are multiplexed over six kernel threads, so multiple user threads share kernel execution entities. This is the many-to-many mapping pattern rather than one-to-one or many-to-one in this configuration.

Q28. A student claims a two-level model is simply one-to-one mapping because at least one user thread is bound to a kernel thread. What is the key correction?

A.A two-level model has no kernel threads
B.A two-level model maps every user thread to exactly one dedicated kernel thread
C.A two-level model prevents parallel execution
D.Binding selected threads does not remove multiplexing for the remaining user threads ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: The defining feature is not merely that binding exists. A two-level model retains multiplexing for other user threads while allowing selected threads to have dedicated kernel-thread associations for specific workloads.

Q29. A many-to-many runtime has eight user threads and four kernel threads. One user thread blocks on a system call using one kernel thread. If the other three kernel threads remain available and runnable user threads can be assigned to them, how many execution paths remain for other work?

A.Three ✅
B.Four
C.Seven
D.Eight
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The blocking call occupies one of the four kernel threads, leaving three other kernel execution paths. Runnable user threads may use those paths, so three execution paths remain for other work under the stated assumptions.

Q30. A diagram shows six user threads mapped onto two kernel threads. One kernel thread is running a user thread while the other is blocked. A third user thread is ready. What must happen before the ready user thread can execute?

A.It must receive a new process address space
B.An execution path must become available and the runtime must map the ready user thread onto it ✅
C.The blocked kernel thread must be converted into a processor core
D.The user thread must terminate and restart
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The ready user thread cannot execute until a kernel execution path is available and assigned to it. In a multiplexed model, user-level readiness alone does not guarantee immediate processor execution.

Q31. An application compares two mappings. Model X has eight user threads sharing one kernel thread; Model Y gives each user thread its own kernel thread. A blocking call occurs in one user thread. Which comparison is correct?

A.Both models necessarily block every user thread
B.Model X blocks only the caller, while Model Y blocks the whole process
C.Model X may block all mapped user threads, while Model Y can allow other independently mapped threads to continue ✅
D.Neither model allows other threads to execute during a blocking call
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: In Model X, the single kernel thread is blocked, preventing the other mapped user threads from using it. In Model Y, other user threads have independent kernel threads and may continue if runnable.

Q32. A two-level process has nine user threads and four kernel threads. One user thread is bound to one kernel thread, and the other eight share the remaining three. If four cores are available and all threads are runnable, what is the maximum simultaneous execution count?

A.Nine
B.Eight
C.Three
D.Four ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: The mapping provides four kernel execution paths, including the bound thread's path, and four processor cores are available. Thus at most four user threads can execute simultaneously, assuming all paths have runnable work.

Q33. A many-to-many runtime has 20 user threads and six kernel threads. One kernel thread becomes blocked, while five remain available; the machine has four free cores and at least four other user threads are runnable. What is the maximum simultaneous execution count for those other threads?

A.Four ✅
B.Five
C.Six
D.Twenty
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Only five kernel threads remain available, but four free cores impose the tighter limit. With at least four runnable user threads, the maximum simultaneous execution count is four under the stated assumptions.

🔗 Related Topics (MCQs)