CPU Burst and I/O Burst Cycles
You'll learn: How processes alternate between computation and waiting for input/output, a pattern that shapes how the OS schedules work.
The Core Idea
When a process runs, it doesn't execute continuously from start to finish. Instead, it alternates between two distinct phases:
- CPU Burst — A period when the process actively uses the CPU to perform computations (adding numbers, comparing values, executing logic)
- I/O Burst — A period when the process waits for input/output operations to complete (reading a file, waiting for user input, sending network data)
Think of cooking a meal: you chop vegetables (CPU work), then put them in the oven and wait (I/O wait), then season and plate the dish (more CPU work). You're not actively working the entire time—you alternate between doing and waiting.
Why This Matters for Scheduling
The operating system's scheduler must understand these patterns to make smart decisions:
- During a CPU burst, the process needs processor time
- During an I/O burst, the process is blocked/waiting—the CPU can be given to another process
- Different programs have different burst patterns: a video encoder has long CPU bursts; a text editor has short CPU bursts between frequent I/O operations
The CPU scheduler's job is to keep the CPU busy by switching to another ready process whenever the current one enters an I/O burst. This maximizes overall system throughput.
Burst Sequences
A typical process might follow this sequence: CPU burst → I/O burst → CPU burst → I/O burst → ... → CPU burst → terminate
Key Takeaway: Processes alternate between CPU execution (CPU bursts) and waiting for I/O (I/O bursts); recognizing these cycles allows the OS to efficiently schedule multiple processes and keep the CPU utilized.