Problem
If a process uses up its quantum just as another arrives, the arriving one joins the queue first.Stallings 9e, table 9.5 · Univ. of Seville
| Process | Arrival | Burst | |
|---|---|---|---|
Trace
t=0: the CPU is free. A starts (the first in the queue).
Results
| Process | Finish | Turnaround | Waiting | Response |
|---|---|---|---|---|
| A | 4 | 4 | 1 | 0 |
| B | 18 | 16 | 10 | 0 |
| C | 17 | 13 | 9 | 1 |
| D | 20 | 14 | 9 | 1 |
| E | 15 | 7 | 5 | 2 |
| Average | 10.80 | 6.80 | 0.80 |
Turnaround = finish − arrival · Waiting = turnaround − burst · Response = first time on CPU − arrival.
Check my answer
Write your Gantt chart as “process start-end” slices, for example A 0-3, B 3-7 (and - for an idle CPU). You can merge consecutive slices of the same process.