GATE / CS ARCHIVE

SIMILAR QUESTIONS / OPERATING SYSTEMS

Check process-state transitions and preemption

4 questions solved the same way, newest first. Back to Operating Systems

How these are solved

Both apply the ready/running/blocked process-state transition model: distinguish dispatch from admission, preemption from blocking, and wakeup to ready from direct dispatch.

1 mark · MSQ
Report issue

Identify impossible direct process transitions

Processes, Threads & System Calls

Question 25, GATE 2024: In the standard process-state model, which direct transitions are not possible? A Running→Ready; B Waiting→Running; C Ready→Waiting; D Running→Terminated.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B, C

Approach: Recall the distinction between being eligible to run, actually executing, and being blocked for an event.
1. Running→Ready is possible when the scheduler preempts a process, for example when its time slice expires. The process can still execute, but no longer holds the CPU. Thus A is not selected.
2. Waiting→Running is not a direct transition in this model. Completion of the awaited event makes the process Ready; only a later scheduling/dispatch action makes it Running. Select B.
3. Ready→Waiting is also not direct. A ready process is not executing and therefore cannot issue the blocking operation that makes it wait. It must first be dispatched to Running. Select C.
4. Running→Terminated is possible when a process exits, so D is not selected.
Answer: B and C. The question is about edges of the abstract state diagram, not whether a waiting process can eventually run after passing through Ready.

Original paper, page 17 · Answer key

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

2 marks · MCQ
Report issue

Process-state transition interpretation

Processes, Threads & System Calls

Question 32, GATE 2009: Process transitions: A Start→Ready; B Ready→Running; C Running→Ready; D Running→Terminated; E Blocked→Ready; F Running→Blocked. A uniprocessor always has some ready processes. Assess I D immediately causes another A; II E may occur while another process runs; III preemptive scheduling; IV nonpreemptive scheduling. A I/II; B I/III; C II/III; D II/IV.
Tap to enlarge
Your answer
Answer & solution

Answer: C under conventional preemption labeling (no official key was published)

D terminates a running process; another ready process is dispatched through B, not newly admitted through A, so I is false. A blocked process can become ready by E while another runs, so II is true. The running-to-ready edge C represents preemption in the conventional diagram, making III true and IV false. Thus II and III, C. If C were instead explicitly defined as voluntary yield, the drawing alone would not establish preemption; the usual state-diagram convention is used.

Termination frees the CPU, so the scheduler dispatches an already ready process along B. It need not create or admit a process along A, making I false. An I/O completion can move a different process from blocked to ready while the CPU is busy, making II true. Under the conventional interpretation, C is preemption and distinguishes the diagram from a purely nonpreemptive scheduler. Thus III is selected with II; if C instead explicitly meant voluntary yield, that additional meaning would need a separate analysis.

Original paper, page 7

1 mark · MCQ
Report issue

A running-to-ready transition

CPU Scheduling

Question 1.18, GATE 1996: A process-state diagram includes ready→running, running→ready, running→blocked and blocked→ready. What scheduler feature does the usual diagram indicate?
Tap to enlarge
Your answer
Answer & solution

Answer: B: preemptive scheduling (no official key was published)

Dispatch moves a ready process into running. An I/O or resource wait moves it into blocked, and completion moves it back to ready. In the standard scheduling diagram, the extra running→ready edge represents the scheduler taking the CPU away, for example at time-slice expiry. That is preemption, giving B. A real system may also let a process voluntarily yield into ready; the unlabeled graph alone would then not prove involuntary preemption. The answer uses the conventional interpretation of this textbook state-transition diagram.

Original paper, page 3