GateAI
CPU and I/O Scheduling

GATE CSE 2012 · Q31

MCQ2 marksMedium

Time

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

GATE CSE 2012 Q31 diagram

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) FCFS: P1, P2, P3 RR2: P1, P3, P2

CPU and I/O Scheduling

### 1. First-Come First-Served (FCFS):

  • At t=0t = 0, P1 arrives and runs until completion at t=5t = 5.

  • At t=5t = 5, P2 (arrived at t=1t = 1) runs until completion at t=5+7=12t = 5 + 7 = 12.

  • At t=12t = 12, P3 (arrived at t=3t = 3) runs until completion at t=12+4=16t = 12 + 4 = 16.

Completion order for FCFS:P1, P2, P3

---

### 2. Round Robin with Quantum = 2 (RR2):

  • At t=0t = 0: Ready queue: [P1]. P1 executes for 2 units (time 0→20 \to 2, remaining = 33). During this time, P2 arrives at t=1t = 1.

  • At t=2t = 2: Ready queue: [P2, P1]. P2 executes for 2 units (time 2→42 \to 4, remaining = 55). During this time, P3 arrives at t=3t = 3.

  • At t=4t = 4: Ready queue: [P1, P3, P2]. P1 executes for 2 units (time 4→64 \to 6, remaining = 11).

  • At t=6t = 6: Ready queue: [P3, P2, P1]. P3 executes for 2 units (time 6→86 \to 8, remaining = 22).

  • At t=8t = 8: Ready queue: [P2, P1, P3]. P2 executes for 2 units (time 8→108 \to 10, remaining = 33).

  • At t=10t = 10: Ready queue: [P1, P3, P2]. P1 executes for its remaining 1 unit (time 10→1110 \to 11). P1 finishes at t=11t = 11.

  • At t=11t = 11: Ready queue: [P3, P2]. P3 executes for its remaining 2 units (time 11→1311 \to 13). P3 finishes at t=13t = 13.

  • At t=13t = 13: Ready queue: [P2]. P2 executes for its remaining 3 units (time 13→1613 \to 16). P2 finishes at t=16t = 16.

Completion order for RR2:P1, P3, P2

Thus, the correct option is (C).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

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

Where do you stand for GATE?

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.

One GATE CSE PYQ every morning

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 in GATE CSE

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 Scheduling

More from GATE CSE 2012

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2012 · Q31 · MCQ

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

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.