Thread Management MCQs for NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

Thread management is how an operating system creates, schedules and coordinates threads, the units of CPU execution inside a process. The core exam ideas are what threads share and keep private, user versus kernel threads, and the three multithreading models that connect them. It is topic 5 of the Operating Systems area, which carries 5% of the NSCT according to HEC's Areas of Competencies. Operating Systems had the lowest accuracy of any area in 2026, at 33.8%, per the HEC NSCT report and APP.

This page builds on Process Management. We follow Silberschatz's Operating System Concepts.

Threads versus processes

A thread is a basic unit of CPU use. Silberschatz lists what each thread owns and what it shares with the other threads of its process:

Private to each thread Shared by all threads of the process
Thread ID Code section
Program counter Data section (global and static variables)
Register set Heap
Stack (local variables, return addresses) Open files and signal handlers

Because threads share an address space, creating and switching them is cheaper than for processes. Silberschatz names four benefits: responsiveness, resource sharing, economy and scalability. The cost is weaker isolation: one thread's bug can corrupt data that every thread uses.

Concurrency means several tasks make progress; parallelism means several run at the same instant. A single core gives concurrency without parallelism.

Exam angle: a static local variable in C is shared, like a global; an ordinary local variable lives on each thread's own stack.

User vs kernel threads

User threads are managed by a thread library in user space, with no kernel involvement. Creating and switching them is fast, but the kernel does not know they exist. Kernel threads are created, scheduled and managed by the OS itself, so the kernel can block one and run another, or place them on different cores.

Feature User threads Kernel threads
Managed by User-level library Operating system
Creation and switch cost Low (no system call) Higher (kernel involved)
Blocking system call Can block the whole process (many-to-one) Blocks only that thread
Multicore parallelism Only through kernel threads Yes

The three main thread libraries are POSIX Pthreads, Windows threads and Java threads. Pthreads is a specification, not an implementation, so it can be provided as either a user-level or a kernel-level library.

Exam angle: user threads always need some mapping onto kernel threads to run; that mapping is the multithreading model.

Multithreading models

Model Mapping Blocking call Parallel on multicore? Example
Many-to-one Many user threads onto 1 kernel thread Blocks the whole process No Early "green threads"
One-to-one Each user thread onto its own kernel thread Blocks only that thread Yes Linux, Windows
Many-to-many Many user threads onto an equal or smaller number of kernel threads Others can run on other kernel threads Yes Some older UNIX systems

The two-level model is many-to-many plus the option to bind one user thread to its own kernel thread. Between user and kernel threads, many-to-many systems place a lightweight process (LWP), a virtual processor backed by one kernel thread. Scheduler activations let the kernel tell the library, through an upcall, that a thread is about to block, so it can move work to another LWP.

Example: 6 user threads multiplexed onto 3 kernel threads on an 8-core machine can run at most 3 at once, because only kernel threads reach the cores.

Exam angle: Silberschatz notes many-to-many is the most flexible but hard to implement, which is why modern systems mostly use one-to-one.

Amdahl's law

Amdahl's law gives the best speedup from N cores when a fraction S of the work must run serially: speedup <= 1 / (S + (1 - S) / N). As N grows, the speedup approaches 1/S, so the serial part sets a ceiling.

Threading issues

Common traps

Worked examples

1. Understanding. Why is creating a thread cheaper than creating a process? Answer: a new thread shares its process's code, data, heap and open files, so the OS only has to set up a thread ID, registers and a stack. A new process needs its own address space and resource tables.

2. Application. A program is 60% parallel. What speedups does Amdahl's law predict on 4 and 8 cores? Answer: about 1.82 and about 2.11. 1 / (0.4 + 0.6/4) = 1 / 0.55 = 1.82, and 1 / (0.4 + 0.6/8) = 1 / 0.475 = 2.11. Doubling the cores adds only about 16%, and the ceiling is 1/0.4 = 2.5.

3. Analysis. A process maps 6 user threads onto 2 LWPs on a 4-core machine. One LWP's thread blocks on a disk read. How many of the process's threads can run now? Answer: one. The blocked kernel thread takes its LWP with it, leaving a single LWP for the 5 remaining user threads. The idle cores do not help; with scheduler activations, the kernel could hand the library a fresh LWP through an upcall.

Practise

The quiz below has 100 Thread Management questions, filterable by tier and difficulty.

Practise: 100 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. Threads that belong to the same process share which of the following?

    1. A single stack used by every thread
    2. One program counter for all threads
    3. Global variables and the heap
    4. One register set for all threads
    Show answer

    Answer: C. Global variables and the heap

    Silberschatz lists what threads share: the code section, the data section (global variables), heap memory and OS resources such as open files. Each thread keeps its own thread ID, program counter, register set and stack.

  2. Which of these does each thread of a multithreaded process have its own copy of?

    1. Its stack
    2. The code section
    3. The table of open files
    4. The global data section
    Show answer

    Answer: A. Its stack

    A thread is a basic unit of CPU use with its own thread ID, program counter, register set and stack. The stack must be private because each thread calls different functions and needs its own local variables and return addresses. Code, globals and open files are shared.

  3. Silberschatz gives four benefits of multithreaded programming. Which of these is NOT one of them?

    1. Responsiveness
    2. Resource sharing
    3. Scalability on multiprocessors
    4. Stronger memory protection between tasks
    Show answer

    Answer: D. Stronger memory protection between tasks

    The four benefits are responsiveness, resource sharing, economy and scalability. Threads share one address space, so they give weaker isolation than separate processes, not stronger. Memory protection between tasks is an argument for processes.

  4. User-level threads are created and managed by:

    1. The kernel's scheduler directly
    2. A thread library in user space, without kernel support
    3. The hardware memory-management unit
    4. The bootloader when the process is loaded
    Show answer

    Answer: B. A thread library in user space, without kernel support

    User threads are supported above the kernel and managed by a user-level library, so creating and switching them needs no system call. Kernel threads are supported and managed directly by the operating system.

  5. In the many-to-one multithreading model, what happens when one thread makes a blocking system call?

    1. Only that thread blocks and the others keep running
    2. The entire process blocks
    3. The kernel creates a new kernel thread for the rest
    4. The call is converted into a non-blocking call automatically
    Show answer

    Answer: B. The entire process blocks

    Many-to-one maps all user threads onto a single kernel thread. The kernel sees only that one thread, so when it blocks, no other user thread of the process can run until the call returns.

  6. Which multithreading model do Linux and the Windows family of operating systems implement?

    1. Many-to-one
    2. One-to-one
    3. Many-to-many
    4. Two-level
    Show answer

    Answer: B. One-to-one

    Linux and Windows map each user thread to its own kernel thread (one-to-one). This gives full concurrency and lets threads run in parallel on multicore systems, at the cost of creating a kernel thread for every user thread.

  7. A single-core CPU runs four threads of an application by rapidly switching between them. This is best described as:

    1. Concurrency without parallelism
    2. Parallelism without concurrency
    3. Both concurrency and parallelism
    4. Neither concurrency nor parallelism
    Show answer

    Answer: A. Concurrency without parallelism

    Concurrency means more than one task makes progress; parallelism means more than one task runs at the same instant. A single core interleaves the threads, so they are concurrent, but only one executes at any moment, so there is no parallelism.

  8. Which model lets a program create as many user threads as it needs while the corresponding kernel threads can still run in parallel on a multiprocessor?

    1. Many-to-many
    2. Many-to-one
    3. One-to-one
    4. One-to-many
    Show answer

    Answer: A. Many-to-many

    Many-to-many multiplexes many user threads onto a smaller or equal number of kernel threads. Developers are not limited in the number of user threads, and the kernel threads can run in parallel. Many-to-one gives no parallelism; one-to-one limits how many threads are practical.

  9. What is the main drawback of the one-to-one model?

    1. A blocking system call in one thread blocks the whole process
    2. Threads cannot run in parallel on multicore processors
    3. Creating each user thread requires creating a kernel thread, so many threads can burden the system
    4. Threads of the same process cannot share global data
    Show answer

    Answer: C. Creating each user thread requires creating a kernel thread, so many threads can burden the system

    Because every user thread needs its own kernel thread, thread creation is more expensive and a large number of kernel threads can hurt performance, so some systems cap the count. The blocking and no-parallelism problems belong to many-to-one.

  10. With which kind of thread cancellation does the target thread check periodically whether it should terminate, so it can stop at a safe point?

    1. Asynchronous cancellation
    2. Deferred cancellation
    3. Signal-based preemption
    4. Cooperative scheduling
    Show answer

    Answer: B. Deferred cancellation

    In deferred cancellation, the target thread terminates only at cancellation points (for example when it calls pthread_testcancel()), so it can release resources first. Asynchronous cancellation terminates it immediately, which can leave shared data or resources in an inconsistent state.

FAQs

What is the difference between a process and a thread?

A process is a program in execution with its own address space and resources. A thread is a unit of execution inside a process. Threads of the same process share code, data, heap and open files, but each has its own stack, registers and program counter. Threads are cheaper to create, while processes are better isolated.

Which multithreading model does Linux use?

Linux uses the one-to-one model: each user thread maps to its own kernel thread. Internally Linux calls processes and threads both "tasks" and creates them with clone(), whose flags decide how much the new task shares with its parent. Windows also uses one-to-one.

Why can many-to-one not use multiple cores?

All the user threads run on a single kernel thread, and the operating system schedules only kernel threads onto cores. One kernel thread can run on only one core at a time, so the process never runs two of its threads in parallel, however many cores exist.

Are user threads faster than kernel threads?

Creating and switching user threads is faster, because the library does it without system calls. But under many-to-one, a blocking call stops every thread, and there is no multicore parallelism. Kernel threads cost more per operation but let the OS block, schedule and parallelise each thread independently.

Next step

Continue to Concurrency & Synchronization, revisit CPU Scheduling, return to the Operating Systems MCQ hub, or take a timed NSCT mock test.