Consider the 3 processes, P1, P2 and P3 shown in the table. The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2012 · Q31
Time

Select one answerSingle correct
Solution
Official answer: C) FCFS: P1, P2, P3 RR2: P1, P3, P2
CPU and I/O Scheduling### 1. First-Come First-Served (FCFS):
At , P1 arrives and runs until completion at .
At , P2 (arrived at ) runs until completion at .
At , P3 (arrived at ) runs until completion at .
Completion order for FCFS:P1, P2, P3
---
### 2. Round Robin with Quantum = 2 (RR2):
At : Ready queue: [P1]. P1 executes for 2 units (time , remaining = ). During this time, P2 arrives at .
At : Ready queue: [P2, P1]. P2 executes for 2 units (time , remaining = ). During this time, P3 arrives at .
At : Ready queue: [P1, P3, P2]. P1 executes for 2 units (time , remaining = ).
At : Ready queue: [P3, P2, P1]. P3 executes for 2 units (time , remaining = ).
At : Ready queue: [P2, P1, P3]. P2 executes for 2 units (time , remaining = ).
At : Ready queue: [P1, P3, P2]. P1 executes for its remaining 1 unit (time ). P1 finishes at .
At : Ready queue: [P3, P2]. P3 executes for its remaining 2 units (time ). P3 finishes at .
At : Ready queue: [P2]. P2 executes for its remaining 3 units (time ). P2 finishes at .
Completion order for RR2:P1, P3, P2
Thus, the correct option is (C).
Try the question first, then check your work.
Examiner trap
Trace the execution using a Gantt chart for both scheduling policies, carefully maintaining the ready queue for Round Robin at each preemption point.
This CPU and I/O Scheduling previous year question is Q31 of the GATE CSE 2012 paper. Find more GATE CSE PYQs on CPU and I/O Scheduling in Operating Systems, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related CPU and I/O Scheduling PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
CPU and I/O Scheduling has 25 GATE CSE PYQs across 22 papers from 2011 to 2026. 7 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2012.
How GATE tests CPU and I/O SchedulingIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.