π§ What is a CPU Burst Cycle?
A CPU Burst is a period during which a process actively uses the CPU for computation, before it waits for I/O or some other event.
In other words:
CPU Burst = the time a process spends executing on the CPU
I/O Burst = the time a process spends waiting for I/O
π Burst Cycle = Alternating Between CPU and I/O
Every process goes through a cycle of bursts:
[CPU Burst] β [I/O Burst] β [CPU Burst] β [I/O Burst] β ... β Terminate
π§© Example:
A word processor might:
-
Run a CPU burst while formatting text
-
Hit an I/O burst when saving the file to disk
-
Return to CPU burst for spell checking
π Duration of CPU Bursts
-
CPU bursts vary greatly in length
-
Most processes have many short bursts, and a few long ones
This burst pattern is typically exponentially distributed, with many short bursts and few long bursts.
π Why It Matters for Scheduling
Different scheduling algorithms optimize based on how they predict or respond to CPU bursts:
| Algorithm | Behavior |
|---|---|
| π FCFS | Doesnβt care about burst length β runs till done |
| π SJF/SRTF | Favors short CPU bursts |
| π Round Robin | Uses time quantum to cycle through bursts fairly |
| β Multilevel Feedback Queue | Adjusts priority based on observed burst behavior |
Shorter bursts tend to keep the system more responsive (important for interactive applications).
βοΈ CPU-Bound vs I/O-Bound
| Type | Description | Burst Pattern |
|---|---|---|
| π§ CPU-bound | Spends most time on computation | Long CPU bursts, short I/O |
| πΎ I/O-bound | Frequently waits for input/output | Short CPU bursts, long I/O |
Schedulers often favor I/O-bound processes to avoid wasting CPU cycles.
π§ Interview-Ready Definition:
A CPU Burst is a period when a process uses the CPU continuously before performing an I/O operation. CPU and I/O bursts alternate throughout the process lifecycle, and scheduling algorithms use burst characteristics to decide how to allocate CPU time efficiently.