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

Figure

Now which of the process shall finish second last as per the respective GANTT charts for the nonpreemptive SJF and Round Robin (time quantum =10 ) scheduling methods.

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

Show answer & explanation

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

Explanation

Non-preemptive SJF: 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; again P5 finishes second last.

More System Software and Operating System questions