The GATE Grind

GATE 2012 CS (CS1) – Question 41

Operating System · CPU and I/O Scheduling · 2 marks · Multiple choice

Processes P₁,P₂,P₃ have (arrival,CPU time) (0,5),(1,7),(3,4). Find completion orders for FCFS and round robin with quantum two.

  1. FCFS P₁,P₂,P₃; RR₂ P₁,P₂,P₃
  2. FCFS P₁,P₃,P₂; RR₂ P₁,P₃,P₂
  3. FCFS P₁,P₂,P₃; RR₂ P₁,P₃,P₂
  4. FCFS P₁,P₃,P₂; RR₂ P₁,P₂,P₃

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (C) FCFS P₁,P₂,P₃; RR₂ P₁,P₃,P₂

Explanation

FCFS runs in arrival order, completing P₁,P₂,P₃. RR timeline is P₁:0–2, P₂:2–4, P₁:4–6, P₃:6–8, P₂:8–10, P₁:10–11, P₃:11–13, P₂:13–16. Thus RR completes P₁,P₃,P₂. Select C.

More CPU and I/O Scheduling questions

All CPU and I/O Scheduling questions →