CS FundamentalsVery hardGATE CS (PYQ pattern)

SRTF with processes (arrival, burst) in ms: P1 (0, 10), P2 (1, 6), P3 (2, 3), P4 (3, 8), P5 (5, 1), P6 (6, 2). Ties go to the earlier arrival. How many times is a running process preempted (taken off the CPU before it finishes)?

  1. A. 3
  2. B. 4
  3. C. 2
  4. D. 1

Correct answer: C. 2

Simulating one time unit at a time, the running process is replaced by another with a smaller remaining time 2 times (a switch after a completion is not a preemption).

More Operating Systems questions

Exams that ask this topic