GATE / CS ARCHIVE

GATE CSE 2014 SET 1 / QUESTION 20

GATE CSE 2014 Set 1 Q20

Operating Systems · Processes, Threads & System Calls · Full GATE CSE 2014 Set 1 paper

GATE 2014 Set 1, Q20 1 mark · MCQ
Report issue

Processes, Threads & System Calls

Question 20, GATE 2014: Which threading statement is false? A: The kernel does not schedule user-level threads. B: If one user-level thread blocks, all other threads of its process block. C: User-level thread context switching is faster than kernel-level switching. D: Kernel-level threads cannot share the code segment. The usual intended model is many-to-one user threads with blocking system calls.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Our answer: D under the many-to-one user-thread model

1. Method and setup. Separate a thread’s private execution state, such as registers and stack, from process-wide resources such as code and address space. Kernel scheduling does not imply a separate address space per thread. Statements about all user threads blocking depend on how user threads are mapped to kernel scheduling entities.

2. Work through the result and its assumptions. Kernel threads of one process share its address space, including code, so D is false. The remaining statements use the traditional many-to-one user-level-thread model and blocking kernel calls. A user-runtime wait that schedules another user thread need not block the whole process, and hybrid threading differs; the blanket wording of B needs that model.

Original paper, page 12 · Answer key