Which of the following multithreading model is followed in Linux OS?

2023

Which of the following multithreading model is followed in Linux OS?

  1. A.

    One User Thread mapping to One Kernel Thread

  2. B.

    Many User Threads mapping to One Kernel Thread

  3. C.

    One User Thread mapping to Many Kernel Threads

  4. D.

    Many User Threads mapping to Many Kernel Threads

Attempted by 163 students.

Show answer & explanation

Correct answer: A

Concept

A multithreading model describes how user-level threads (created by a thread library) are mapped onto kernel-level threads (the entities the operating-system scheduler actually dispatches). Three classical mappings exist:

  • One-to-one (1:1): every user thread is backed by its own kernel thread, so the kernel schedules each one independently.

  • Many-to-one (M:1): many user threads share a single kernel thread, scheduled in user space.

  • Many-to-many (M:N): M user threads are multiplexed over a smaller pool of N kernel threads by a two-level scheduler.

Application to Linux

Modern Linux implements POSIX threads through the Native POSIX Thread Library (NPTL), which uses the one-to-one model. Each pthread the application creates is realised as a distinct kernel scheduling entity (a task created via the clone() system call sharing the address space). Therefore the answer is “One User Thread mapping to One Kernel Thread”.

Why the one-to-one model fits Linux

  • Independent scheduling: the kernel sees and schedules every thread, so threads can run on different CPU cores for genuine parallelism.

  • No convoy on blocking: if one thread issues a blocking system call, only that kernel entity blocks; the others keep running.

  • Historical fit: NPTL replaced the older Linux threading implementations (the original LinuxThreads and the experimental M:N NGPT project) because a clean, direct mapping scales better on SMP hardware than a two-level scheme.

Cross-check (contrast with the other models)

  • Many-to-one would let a single blocking call stall every thread and cannot use multiple cores — not what Linux does.

  • Many-to-many is the hybrid two-level scheme (for example, classic Solaris); the Linux kernel does not run such a user-space scheduler over a smaller kernel-thread pool.

  • One-to-many is not a usable model at all, since one thread of control cannot execute on several kernel entities simultaneously.

Explore the full course: Isro