Four jobs to be executed on a single processor system arrive at time 0 in the…
19962008
Four jobs to be executed on a single processor system arrive at time 0 in the order A, B, C, D. The burst CPU time requirements are 4, 1, 8, 1 time units respectively. The completion time of A under round robin scheduling with time slice of one time unit is:
- A.
10
- B.
4
- C.
8
- D.
9
Attempted by 234 students.
Show answer & explanation
Correct answer: D
Round Robin Scheduling (Time Quantum = 1)
Processes: A, B, C, D
Arrival Time = 0 (all)
Burst Times: A=4, B=1, C=8, D=1
Execution Table
Time | Process | Remaining Burst (A,B,C,D) |
|---|---|---|
0–1 | A | 3,1,8,1 |
1–2 | B | 3,0,8,1 (B finishes) |
2–3 | C | 3,0,7,1 |
3–4 | D | 3,0,7,0 (D finishes) |
4–5 | A | 2,0,7,0 |
5–6 | C | 2,0,6,0 |
6–7 | A | 1,0,6,0 |
7–8 | C | 1,0,5,0 |
8–9 | A | 0,0,5,0 (A finishes) |
Gantt Chart
| A | B | C | D | A | C | A | C | A |......................................
0 1 2 3 4 5 6 7 8 9
Completion time of A = 9 time units.
A video solution is available for this question — log in and enroll to watch it.