---
title: "Round robin scheduling (53, 17, 68, 24 ms)"
subject: "Embedded System"
chapter: 6
key: "semester_6/embedded_system:sched-rr-53-17-68-24-q4"
source: https://www.bctengineer.com/q/semester_6/embedded_system/sched-rr-53-17-68-24-q4
site: BCT Engineering
---

# Round robin scheduling (53, 17, 68, 24 ms)

Embedded System · Chapter 6: RTOS

- Asked in: 2078 Chaitra
- Video: [Round Robin Scheduling Algorithm| Preemptive | Operating System  | OS](https://www.youtube.com/watch?v=j5Rt_at1oyk) — Sudhakar Atchala
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/embedded_system/sched-rr-53-17-68-24-q4
- Whole chapter: https://www.bctengineer.com/md/semester_6/embedded_system/chapter-6

## Question

Consider three processes with process IDs P1, P2, P3 and P4 with estimated completion time 53, 17, 68, 24 ms respectively, enters the ready queue together in order P1, P2, P3, P4. Calculate waiting time and turn around time for each process and average waiting times and average turn around time in Round Robin algorithm with time slice 4 ms. Assume there is no I/O waiting for the process.

## Short answer

Round-robin with quantum 4 ms yields waiting times: P1 93, P2 52, P3 94, P4 65 ms; average waiting time = 76 ms, average turnaround time = 116.5 ms.

## Answer

Round robin with a time slice of 4 ms; all four processes arrive at 0 in the order P1, P2, P3, P4. The Gantt chart is long, so the rounds are summarised below it.

#### Gantt chart

```text
| P1 | P2 | P3 | P4 | P1 | P2 | P3 | P4 | P1 | P2 | P3 |
0    4    8    12   16   20   24   28   32   36   40   44

| P4 | P1 | P2 | P3 | P4 | P1 | P2 | P3 | P4 | P1 | P3 |
44   48   52   56   60   64   68   69   73   77   81   85

| P4 | P1 | P3 | P1 | P3 | P1 | P3 | P1 | P3 | P1 | P3 |
85   89   93   97   101  105  109  113  117  121  125  129

| P1 | P3 | P1 | P3 | P1 | P3 | P3 | P3 | P3 |
129  133  137  141  145  146  150  154  158  162
```

#### Rounds

- Rounds 1-4 (0-64): P1, P2, P3, P4 run 4 ms each per round (16 ms per round). Remaining after round 4: P1 37, P2 1, P3 52, P4 8.
- Round 5 (64-77): P1 64-68, P2 68-69 (needs only 1 ms, so it finishes at 69), P3 69-73, P4 73-77.
- Round 6 (77-89): P1 77-81, P3 81-85, P4 85-89 (P4 finishes at 89).
- From 89 only P1 (29 ms left) and P3 (44 ms left) remain and alternate in 4 ms slices: P1 89-93, P3 93-97, and so on.
- P1 finishes at 146 (its last slice is 1 ms, 145-146). P3 then runs alone from 146 to 162.

#### Calculation

TAT = completion time - arrival time; WT = TAT - burst time.

| Process | AT | BT | CT | TAT = CT - AT | WT = TAT - BT |
|---|---|---|---|---|---|
| P1 | 0 | 53 | 146 | 146 | 93 |
| P2 | 0 | 17 | 69 | 69 | 52 |
| P3 | 0 | 68 | 162 | 162 | 94 |
| P4 | 0 | 24 | 89 | 89 | 65 |

AWT = (93 + 52 + 94 + 65) / 4 = 304/4 = 76 ms

ATAT = (146 + 69 + 162 + 89) / 4 = 466/4 = 116.5 ms

**Answer: AWT = 76 ms, ATAT = 116.5 ms.**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. After four rounds (64 ms), what is P2's state?
   A. Finished
   B. 5 ms left
   C. 1 ms left
   D. 4 ms left
   Answer: C. P2: 17 - 16 = 1 ms. (Key point: Remaining after 4 rounds)

2. Why does P2 run only 1 ms in round 5?
   A. The quantum changes
   B. It needs only 1 ms, less than the quantum
   C. It is pre-empted
   D. It has priority
   Answer: B. A process finishing early gives up the CPU. (Key point: Short slice)

3. Who finishes last and when?
   A. P3 at 162 ms
   B. P1 at 162 ms
   C. P4 at 162 ms
   D. P3 at 146 ms
   Answer: A. P3 runs alone 146-162. (Key point: Last process)

4. AWT and ATAT?
   A. 116.5 ms and 76 ms
   B. 93 ms and 146 ms
   C. 304 ms and 466 ms
   D. 76 ms and 116.5 ms
   Answer: D. AWT = 304/4; ATAT = 466/4. (Key point: Averages)

## Close variants set in other exams

- [Round robin scheduling (9, 6, 3 ms, q=2)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-rr-9-6-3-q2) — Embedded System, chapter 6, asked 4×
- [Round robin scheduling (6, 4, 2 ms, q=2)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-rr-6-4-2-q2) — Embedded System, chapter 6, asked 4×
- [Round robin scheduling (9, 6, 3 ms, q=3)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-rr-9-6-3-q3) — Embedded System, chapter 6, asked 4×

## Related in Embedded System

- [Round robin scheduling (5, 8, 7 ms, q=2)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-rr-5-8-7-q2) — Embedded System, chapter 6
- [Preemptive priority scheduling with P4 (6 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-10-5-7-p4) — Embedded System, chapter 6, asked 2×
- [Priority scheduling (7, 8, 5 ms) with P4](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-7-8-5-p4) — Embedded System, chapter 6, asked 2×
- [Non-preemptive priority scheduling (10, 5, 7 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-nonpreemptive-10-5-7) — Embedded System, chapter 6, asked 2×
- [Preemptive SJF/SRT scheduling (10, 5, 7 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-srt-10-5-7) — Embedded System, chapter 6
- [Priority and SJF scheduling with P4 and P5](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-and-sjf-5-process) — Embedded System, chapter 6, asked 2×

## Related in other subjects

- [Real-time scheduling; two-processor numerical](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Arealtime-two-processor-fcfs-sjf-priority-rr) — Operating System, chapter 2
