User level threads are threads that are visible to the programmer and are…

2017

User level threads are threads that are visible to the programmer and are unknown to the kernel. The operating system kernel supports and manages kernel level threads. Three different types of models relate user and kernel level threads.

Which of the following statements is/are true ?

(a)

    (i) The Many - to - one model maps many user threads to one kernel thread

    (ii) The one - to - one model maps one user thread to one kernel thread

    (iii) The many - to - many model maps many user threads to smaller or equal kernel threads

(b)

    (i) Many - to - one model maps many kernel threads to one user thread

    (ii) One - to - one model maps one kernel thread to one user thread

    (iii) Many - to - many model maps many kernel threads to smaller or equal user threads

Code :

  1. A.

    (a) is true; (b) is false

  2. B.

    (a) is false; (b) is true

  3. C.

    Both (a) and (b) are true

  4. D.

    Both (a) and (b) are false

Attempted by 259 students.

Show answer & explanation

Correct answer: A

Answer: (a) is true; (b) is false.

Explanation of the three models:

  • Many-to-one: Many user-level threads are mapped to a single kernel thread. Because there is only one kernel thread, only one user thread can execute in kernel mode at a time, so this model does not allow parallel execution on multiple CPUs.

  • One-to-one: Each user-level thread is mapped to a distinct kernel thread. This allows true parallelism on multiprocessor systems, since multiple kernel threads can run concurrently.

  • Many-to-many: Many user-level threads are mapped to a pool of kernel threads. The number of kernel threads can be less than or equal to the number of user threads, allowing concurrency up to the number of kernel threads while keeping user-level scheduling flexibility.

Why the second group of statements is false:

  • The second group describes mappings in the wrong direction (it states how kernel threads map to user threads). The standard descriptions relate how user-level threads are mapped onto kernel-level threads, so those inverted statements are incorrect.

Summary: The first set of statements correctly describes Many-to-one, One-to-one, and Many-to-many models (so it is true). The second set simply reverses the mapping direction and is therefore false.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor