CS FundamentalsVery hardGATE CS

Processes (arrival, burst): P1 (0, 7), P2 (2, 3), P3 (3, 1), P4 (6, 2). SRTF is used and every switch to a DIFFERENT process costs 1 ms (none at time 0; a switch after a process finishes also costs 1 ms). At what time does the last process complete?

  1. A. 13 ms
  2. B. 17 ms
  3. C. 18 ms
  4. D. 16 ms

Correct answer: B. 17 ms

Schedule with overhead: P1 0-2 | P3 3-4 | P2 5-8 | P4 9-11 | P1 12-17 (gaps are switches). Without overhead the last completion would be 13.

More Operating Systems questions

Exams that ask this topic