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

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

Embedded System · Chapter 6: RTOS

- Asked in: 2072 Asoj, 6 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-6-4-2-q2
- Whole chapter: https://www.bctengineer.com/md/semester_6/embedded_system/chapter-6

## Question

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.

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

## Answer

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

#### Gantt chart

```text
| 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.**

## Check yourself

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

1. When does P3 finish?
   A. 2 ms
   B. 4 ms
   C. 6 ms
   D. 12 ms
   Answer: C. P3 runs 4-6 in its single slice. (Key point: P3 completion)

2. Which finishes last, and when?
   A. P2 at 12 ms
   B. P1 at 12 ms
   C. P3 at 12 ms
   D. P1 at 10 ms
   Answer: B. P1 has the largest burst. (Key point: Last process)

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

4. AWT and ATAT?
   A. 9.33 ms and 5.33 ms
   B. 6 ms and 10 ms
   C. 16 ms and 28 ms
   D. 5.33 ms and 9.33 ms
   Answer: D. AWT = 16/3; ATAT = 28/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 (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 (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, 10, 5 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-4-10-5-p4) — Embedded System, chapter 6, asked 2×
