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

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

Embedded System · Chapter 6: RTOS

- Asked in: 2072 Magh, 5 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-q3
- 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 milliseconds respectively, enter the ready queue in the order P1, P2, P3. Calculate the waiting time and Turn Around Time (TAT) for each process and also calculate the average waiting time and average TAT in Round Robin algorithm with time slice = 3ms. Assume there is no I/O waiting for the processes.

## Short answer

With round-robin time slice 3 ms, waiting times are P1 9, P2 9, P3 6 ms; average waiting time = 8 ms, average turnaround time = 14 ms.

## Answer

Round robin with a time slice of 3 ms; all processes arrive at 0 in the order P1, P2, P3.

#### Gantt chart

```text
| P1 | P2 | P3 | P1 | P2 | P1 |
0    3    6    9    12   15   18
```

#### Remaining time after each slice

- 0-3 P1 (6 left), 3-6 P2 (3 left), 6-9 P3 (done)
- 9-12 P1 (3 left), 12-15 P2 (done), 15-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 | 9 | 9 | 6 |

AWT = (9 + 9 + 6) / 3 = 24/3 = 8 ms

ATAT = (18 + 15 + 9) / 3 = 42/3 = 14 ms

**Answer: AWT = 8 ms, ATAT = 14 ms.**

## Check yourself

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

1. Why does P3 finish in its first turn?
   A. It has highest priority
   B. It arrived first
   C. Its burst of 3 ms equals the quantum
   D. Quantum is 9
   Answer: C. It completes 6-9. (Key point: P3 with quantum 3)

2. Gantt order?
   A. P1, P2, P3, P1, P1, P2
   B. P1, P2, P3, P1, P2, P1
   C. P3, P2, P1, P1, P2, P1
   D. P1, P1, P2, P2, P3, P1
   Answer: B. P1 and P2 each need two more slices. (Key point: Order)

3. P2's waiting time?
   A. 9 ms
   B. 15 ms
   C. 6 ms
   D. 12 ms
   Answer: A. TAT = 15, WT = 15 - 6 = 9. (Key point: P2 waiting)

4. AWT and ATAT?
   A. 14 ms and 8 ms
   B. 8.67 ms and 14.67 ms
   C. 24 ms and 42 ms
   D. 8 ms and 14 ms
   Answer: D. AWT = 24/3; ATAT = 42/3. (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 (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×

## 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 (4, 6, 5 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-4-6-5) — 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

## 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
