GATE / CS ARCHIVE

GATE CSE 2020 / QUESTION 12

GATE CSE 2020 Q12

Operating Systems · Processes, Threads & System Calls · Full GATE CSE 2020 paper

GATE 2020, Q12 1 mark · MCQ
Report issue

Processes, Threads & System Calls

Question 12, GATE 2020: For preemptive scheduling, which direct state transitions are possible? I running→ready; II ready→running; III blocked→running; IV blocked→ready. Options: A I,II,III; B II,III; C I,II,IV; D all four.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Worked explanation

Ready means eligible to run but not currently assigned a CPU; blocked means waiting for an event and therefore not eligible. A timer interrupt can preempt a running process into ready (I). Dispatch selects a ready process to run (II). I/O completion changes blocked to ready (IV); the scheduler may then dispatch it, but that is a second transition, not the direct blocked→running edge in III. The standard graph also has running→blocked when a process requests I/O. Distinguishing a possible two-edge path from one direct transition is the key to choosing C.

Derivation and answer

Preemption gives running→ready; dispatch gives ready→running; completion of the awaited event gives blocked→ready. In the standard state-transition model a blocked process becomes ready before dispatch, not directly running. Thus I, II, IV, C.

Original paper, page 6 · Answer key