CS FundamentalsVery hardGATE CS

Processes (arrival, burst) in ms: A (0, 4), B (1, 3), C (2, 2). Round Robin with quantum 2 ms; every switch from one process to a different process costs 1 ms of overhead (no overhead before the very first dispatch). What fraction of the total time until all processes finish is useful CPU work?

  1. A. 9/12
  2. B. 9/14
  3. C. 4/13
  4. D. 9/13

Correct answer: D. 9/13

Slices with overhead: A 0-2 | B 3-5 | C 6-8 | A 9-11 | B 12-13. There are 4 ms of switching; the last process ends at 13, so useful work is 9/13. When the same process continues (or the CPU has only one process) no switch is charged.

More Operating Systems questions

Exams that ask this topic