CS FundamentalsModerateGATE CS · TCS NQT

A program uses user-level threads mapped many-to-one onto a single kernel thread. One thread calls a blocking read() on a slow device. What happens, and what does the one-to-one model change?

  1. A. Only the calling thread blocks in both models
  2. B. The whole process blocks, because the kernel sees one schedulable entity; one-to-one lets the other threads keep running
  3. C. The library automatically converts read() into a non-blocking call in both models
  4. D. The kernel moves the other user threads to another CPU

Correct answer: B. The whole process blocks, because the kernel sees one schedulable entity; one-to-one lets the other threads keep running

The kernel knows nothing about user-level threads, so blocking the only kernel thread blocks them all. With one kernel thread per user thread, the others stay runnable and can also run in parallel on several CPUs.

More Operating Systems questions

Exams that ask this topic