All mock tests are FREE till 31 December — register to save your progress

Consider the following table about processes, their burst time and arrival time. Which process shall finish second last as per the respective Gantt charts for non-preemptive SJF and Round Robin (time quantum = 10) scheduling methods?
ProcessBurst TimeArrival Time
P190
P2300
P340
P482
P5116

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. SJF: P5; RR: P5

Explanation

SJF (non-preemptive): P3 0–4, P4 4–12, P1 12–21, P5 21–32, P2 32–62, so P5 finishes second last. RR (q = 10): P1 0–9, P2 9–19, P3 19–23, P4 23–31, P5 31–41, P2 41–51, P5 51–52, P2 52–62, so P5 again finishes second last.

More System Software and Operating System questions