Home › GATE CSE › computerscience › Operating Systems › In the many-to-one user-to-kernel thread mapping…
In the many-to-one user-to-kernel thread mapping, a single blocking I/O call
Ablocks all the user threads in the process
Bblocks only the calling user thread; others run normally
Cis forbidden by the OS
Dautomatically switches to a different process
Answer & Solution
Correct answer: A. blocks all the user threads in the process
In many-to-one (M:1), the user-space library multiplexes many user threads onto ONE kernel thread. The OS only sees that single kernel thread. When it blocks on a syscall, the kernel parks it; all the user threads sharing it are stuck too. This is why M:1 is rare in production; one-to-one (Linux pthreads) avoids the issue at the cost of more kernel-side overhead.
Related questions
On a MULTI-CORE system, a SPIN LOCK is generallyDisabling INTERRUPTS as a way to implement mutual exclusion on a single-CPU system isA LIVELOCK differs from a DEADLOCK in thatSuppose thread A acquires lock L1, then thread B acquires lock L2. Now A tries to acquire Without atomic hardware support, building a correct mutual-exclusion lock for $N \geq 2$ tA CRITICAL SECTION isLinux's `pthread_mutex_lock()` is typically implemented as a HYBRID:What is the PRIMARY problem with using a SPIN LOCK on a SINGLE-CPU uniprocessor system (wi