---
title: "CPU free percentage with I/O (round robin)"
subject: "Embedded System"
chapter: 6
key: "semester_6/embedded_system:cpu-free-percentage-rr"
source: https://www.bctengineer.com/q/semester_6/embedded_system/cpu-free-percentage-rr
site: BCT Engineering
---

# CPU free percentage with I/O (round robin)

Embedded System · Chapter 6: RTOS

- Asked in: 2079 Jestha, 4 marks
- Video: [Round Robin CPU Scheduling Algo](https://www.youtube.com/watch?v=Kd_zN3P7KkU) — Easy Learning with Nisha
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/embedded_system/cpu-free-percentage-rr
- Whole chapter: https://www.bctengineer.com/md/semester_6/embedded_system/chapter-6

## Question

Three processes P1, P2 and P3 arrive at time zero. Their total execution time is 10 ms, 15 ms, and 20 ms respectively. They spent first 20% of their execution time in doing I/O, next 60% in CPU processing and the last 20% again doing I/O. For what percentage of time was the CPU free? Use Round robin algorithm with time quantum 5 ms.

## Short answer

With round-robin quantum 5 ms, CPU is idle during 0–2 ms and 29–33 ms, giving 6 ms free out of 33 ms total; CPU free = 18.18 %.

## Answer

The CPU is free whenever no process is ready to use it. Each process does I/O first, then CPU work, then I/O again; I/O of different processes is assumed to run in parallel (each has its own device), and only CPU bursts are scheduled by round robin with quantum 5 ms.

#### Phase times

| Process | Total | First I/O (20%) | CPU (60%) | Last I/O (20%) |
|---|---|---|---|---|
| P1 | 10 | 2 | 6 | 2 |
| P2 | 15 | 3 | 9 | 3 |
| P3 | 20 | 4 | 12 | 4 |

All three processes arrive at 0 and start with I/O, so they enter the CPU ready queue at 2, 3 and 4 ms respectively.

#### Schedule

```text
|idle| P1 | P2 | P3 | P1 | P2 | P3 |P3|idle|
0    2    7    12   17   18   22   27 29   33
```

- 0-2: CPU free (everyone is doing first I/O).
- 2-7: P1 runs 5 ms (1 ms of its 6 ms left). P2 and P3 join the queue at 3 and 4.
- 7-12: P2 runs 5 ms (4 left). 12-17: P3 runs 5 ms (7 left).
- 17-18: P1 finishes its CPU work; it then does last I/O 18-20.
- 18-22: P2 finishes its CPU work (4 ms); last I/O 22-25.
- 22-27: P3 runs 5 ms (2 left); 27-29: P3 runs the last 2 ms (alone, no other process is ready).
- 29-33: P3 does its last I/O; the CPU is free.

Everything ends at 33 ms (P1 at 20, P2 at 25, P3 at 33).

#### Calculation

Total CPU busy time = 6 + 9 + 12 = 27 ms

Total time = 33 ms

CPU free time = 33 - 27 = 6 ms (0-2 and 29-33)

CPU free percentage = 6 / 33 x 100 = 18.18 %

**Answer: the CPU is free for about 18.18 % of the time (CPU utilisation 81.82 %).**

## Check yourself

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

1. How long is P2's first I/O phase?
   A. 5 ms
   B. 9 ms
   C. 3 ms (20% of 15)
   D. 6 ms
   Answer: C. 20% of 15 = 3. (Key point: Phase times)

2. What is total CPU busy time?
   A. 33 ms
   B. 27 ms (6 + 9 + 12)
   C. 45 ms
   D. 20 ms
   Answer: B. CPU is used for 60% of 10, 15 and 20. (Key point: CPU busy time)

3. When is the CPU free?
   A. 0-2 ms and 29-33 ms
   B. 2-7 ms
   C. Only at 0-2
   D. 7-12 ms
   Answer: A. Initially all do I/O; at the end P3 does its last I/O. (Key point: Idle intervals)

4. CPU free percentage?
   A. 81.82%
   B. 20%
   C. 27%
   D. 18.18%
   Answer: D. 6/33 x 100 = 18.18%. (Key point: Percentage)

## Related in Embedded System

- [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×
- [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
- [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×
- [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×

## Related in other subjects

- [Liang-Barsky: P1(-5,3), P2(15,9)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aliang-barsky-0-0-10-10) — Computer Graphics, chapter 3
- [Round Robin MST on 7-vertex graph](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Around-robin-mst-graph-l) — Data Structure and Algorithm, chapter 10
- [Spanning tree properties; Round Robin MST](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Aspanning-tree-properties-round-robin) — Data Structure and Algorithm, chapter 10
- [First order filter: pole -100, zero -1000, gain 10](https://www.bctengineer.com/question.md?key=semester_5%2Ffilter_design%3Anoninverting-pole-100-zero-1000) — Filter Design, chapter 6
