Start here
Burst characterization
Interactive workloads often show short CPU bursts between long waits; batch/HPC jobs may show long CPU bursts. Misclassifying a workload leads to wrong quanta, wrong cgroup weights, or wrong autoscaling rules.
By the end of this page you should be able to
- Give one reason CPU utilization can be low while latency is high.
- Relate convoy effect to CPU burst ordering under simple FCFS.
- Explain why profiling must be repeated after code changes.
Operating systems · Processes
CPU burst vs I/O burst
Modeling workload phases for scheduling
TL;DR
CPU burst = continuous CPU execution without blocking; I/O burst = phase waiting on devices. Classical scheduling algorithms assume a distribution of CPU bursts; interactive workloads have short CPU bursts and frequent I/O waits, shaping scheduler design (RR, MLQ).
Summary
Burst models are not academic trivia, they explain why naive FCFS convoys batch jobs behind one monster CPU loop and why MLFQ tries to infer “interactive” behavior.
Deeper narrative
Workload characterization drives scheduler choice: interactive tasks need low response time (short CPU bursts between I/O waits); batch jobs maximize throughput. Profilers classify bursts to tune quantum, priority bands, and cgroup weights.
Mechanism (step by step)
Observe inter-arrival
Trace syscalls or block I/O histograms to estimate burst distribution.
Classify
CPU-bound vs I/O-bound vs mixed; tail latency sensitive vs throughput sensitive.
Map to policy
RR for fairness among interactives; CFS weights for service tiers; BFQ for spinning disks.
Validate
Measure p99 latency and CPU utilization jointly, avoid optimizing one metric blindly.
Key insights
Predictability vs reality
Interactive feel
Mixed workloads
Energy-aware scheduling
Did you know?
Common pitfalls
Assuming I/O-bound means low CPU
Compression/serialization can flip phases under load, re-profile after changes.
Micro-benchmark bias
Hot loops look CPU-bound; real systems wait on locks and RPCs.
Comparison
CPU-bound vs I/O-bound (operational view)
| Signal | CPU-bound-ish | I/O-bound-ish |
|---|---|---|
| `top` CPU% | High for thread | Low for thread |
| `iostat` await | Low if disk idle | High when waiting on storage |
| Scheduler impact | Quantum/fairness matters | Wake latency + block layer matters |
Another lens
Workload → scheduler hint
| Profile | Hint |
|---|---|
| Interactive short bursts | Small quantum / latency-oriented class |
| Batch HPC | Longer slices, affinity, avoid migration |
| Mixed cloud | cgroups + autoscaling, not one global knob |
Glossary
CPU burst
I/O burst
Convoy effect
Interview follow-ups
- Why does SJF favor I/O-bound workloads if bursts known?
- How does blocking affect CPU utilization percentage?
- What metric shows convoy under FCFS?
Callouts
Interview tie-in
Relate off-CPU time in `perf` to “I/O burst” when narrating tail latency fixes.
Walkthrough & deep dive
Left: practical “how would I use this?” threads. Right: slower, code-leaning explanations, open one panel at a time so the page does not feel like a wall of sameness.
Walkthrough
Classify
Deep dive
Convoy effect
One long CPU burst delays everyone behind it in FCFS, motivates preemptive policies.
Off-CPU sampling (concept)
# perf record -g -a -- sleep 5# perf report --sort=comm,dso
Self-check
1A long CPU burst under FCFS tends to…
2Interactive programs often exhibit…
3SJF optimality statements assume…