The GATE Grind

GATE 2014 CS (CS2) – Question 42

Operating System · CPU and I/O Scheduling · 2 marks · Numerical answer

Processes A,B,C each run 100 iterations, each consisting of t_c CPU time followed by t_io I/O time. They have separate I/O devices; OS overhead is negligible. (t_c,t_io) in ms: A(100,500), B(350,500), C(200,500). A,B,C start at 0,5,10 ms. Round-robin time slice is 50 ms. At what time does C finish its first I/O (ms)?

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 1000 to 1000

Explanation

With50msquantums, CPU slots begin A0–50,B50–100,C100–150,A150–200,B200–250,C250–300,B300–350,C350–400,B400–450,C450–500. C accumulates200msCPU by500ms, then its separate I/O runs for500ms. Completion is **1000ms**; A’s I/O need not finish first.