- Asked 4/19
- 2072 Asoj · 6 marks
Round robin scheduling (6, 4, 2 ms, q=2)
Short answer
Using round-robin quantum 2 ms, waiting times: P1 6, P2 6, P3 4 ms; average waiting time = 5.33 ms, average turnaround time = 9.33 ms.
Three processes with process IDs P1, P2, P3 with estimated completion time 6, 4, 2 ms respectively, enters the ready queue together in order P1, P2, P3. Calculate waiting time and TAT (Turn Around Time) for each process and average waiting time and TAT. Assume there is no I/O waiting for the processes and RR (Round-Robin) algorithm with time slice = 2 ms.
Round robin with a time slice of 2 ms; all processes arrive at 0 in the order P1, P2, P3.
Gantt chart
| P1 | P2 | P3 | P1 | P2 | P1 |
0 2 4 6 8 10 12
Remaining time after each slice
- 0-2 P1 (4 left), 2-4 P2 (2 left), 4-6 P3 (done)
- 6-8 P1 (2 left), 8-10 P2 (done), 10-12 P1 (done)
Calculation
TAT = completion time - arrival time; WT = TAT - burst time.
| Process | AT | BT | CT | TAT = CT - AT | WT = TAT - BT |
|---|---|---|---|---|---|
| P1 | 0 | 6 | 12 | 12 | 6 |
| P2 | 0 | 4 | 10 | 10 | 6 |
| P3 | 0 | 2 | 6 | 6 | 4 |
AWT = (6 + 6 + 4) / 3 = 16/3 = 5.33 ms
ATAT = (12 + 10 + 6) / 3 = 28/3 = 9.33 ms
Answer: AWT = 5.33 ms, ATAT = 9.33 ms.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Round robin scheduling (9, 6, 3 ms, q=2) · Embedded System, chapter 6 · asked 4×
- Round robin scheduling (53, 17, 68, 24 ms) · Embedded System, chapter 6 · asked 4×
- Round robin scheduling (9, 6, 3 ms, q=3) · Embedded System, chapter 6 · asked 4×
- Round robin scheduling (5, 8, 7 ms, q=2) · Embedded System, chapter 6
- Preemptive priority scheduling with P4 (6 ms) · Embedded System, chapter 6 · asked 2×
- Non-preemptive priority scheduling (10, 5, 7 ms) · Embedded System, chapter 6 · asked 2×
- Priority scheduling (7, 8, 5 ms) with P4 · Embedded System, chapter 6 · asked 2×
- Preemptive SJF/SRT scheduling (10, 5, 7 ms) · Embedded System, chapter 6
- Preemptive priority scheduling (4, 10, 5 ms) · Embedded System, chapter 6 · asked 2×