---
title: "Round robin scheduling (9, 6, 3 ms, q=2)"
subject: "Embedded System"
chapter: 6
key: "semester_6/embedded_system:sched-rr-9-6-3-q2"
source: https://www.bctengineer.com/q/semester_6/embedded_system/sched-rr-9-6-3-q2
site: BCT Engineering
---

# Round robin scheduling (9, 6, 3 ms, q=2)

Embedded System · Chapter 6: RTOS

- Asked in: 2073 Magh, 4 marks
- 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-9-6-3-q2
- Whole chapter: https://www.bctengineer.com/md/semester_6/embedded_system/chapter-6

## Question

Consider three processes with process IDs P1, P2, P3 with estimated completion time 9, 6, 3 ms respectively, enters the ready queue together in order P1, P2, P3. Calculate Waiting Time and Turn Around Time for each process and average waiting time and average turn around time in RR (Round-Robin) algorithm with time slice 2 ms. Assume there is no I/O waiting for the process.

## Short answer

Round-robin with time slice 2 ms yields waiting times: P1 9, P2 9, P3 8 ms; average waiting time = 8.67 ms, average turnaround time = 14.67 ms.

## Answer

Round robin gives each process the CPU for at most one time slice (2 ms), then moves it to the back of the ready queue. All processes arrive at 0 in the order P1, P2, P3.

#### Gantt chart

```text
| P1 | P2 | P3 | P1 | P2 | P3 | P1 | P2 | P1 | P1 |
0    2    4    6    8    10   11   13   15   17   18
```

#### Remaining time after each slice

- 0-2 P1 (7 left), 2-4 P2 (4 left), 4-6 P3 (1 left)
- 6-8 P1 (5), 8-10 P2 (2), 10-11 P3 (done)
- 11-13 P1 (3), 13-15 P2 (done), 15-17 P1 (1), 17-18 P1 (done)

#### Calculation

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

| Process | AT | BT | CT | TAT = CT - AT | WT = TAT - BT |
|---|---|---|---|---|---|
| P1 | 0 | 9 | 18 | 18 | 9 |
| P2 | 0 | 6 | 15 | 15 | 9 |
| P3 | 0 | 3 | 11 | 11 | 8 |

AWT = (9 + 9 + 8) / 3 = 26/3 = 8.67 ms

ATAT = (18 + 15 + 11) / 3 = 44/3 = 14.67 ms

**Answer: AWT = 8.67 ms, ATAT = 14.67 ms.**

## Check yourself

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

1. What does round robin do after a slice?
   A. Terminates it
   B. Gives it higher priority
   C. Moves the process to the back of the ready queue
   D. Blocks it
   Answer: C. Each process gets at most one quantum per turn. (Key point: RR rule)

2. When does P3 finish?
   A. 6 ms
   B. 11 ms
   C. 9 ms
   D. 18 ms
   Answer: B. P3 runs 4-6, then 10-11 for its last 1 ms. (Key point: P3 completion)

3. P1's waiting time?
   A. 9 ms
   B. 18 ms
   C. 8 ms
   D. 0 ms
   Answer: A. TAT = 18, WT = 18 - 9 = 9. (Key point: P1 waiting)

4. AWT and ATAT?
   A. 14.67 ms and 8.67 ms
   B. 8 ms and 14 ms
   C. 26 ms and 44 ms
   D. 8.67 ms and 14.67 ms
   Answer: D. AWT = 26/3; ATAT = 44/3. (Key point: Averages)

## Close variants set in other exams

- [Round robin scheduling (53, 17, 68, 24 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-rr-53-17-68-24-q4) — 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×
- [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×
- [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×
- [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
- [Preemptive priority scheduling (4, 6, 5 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-4-6-5) — Embedded System, chapter 6
