Processes and Scheduling: Worked Examples
Work through each trace before reading the explanation. Then solve the transfer task without the page open.
Example 1: Scheduling changes what “fast” means
Jobs A and B arrive at time 0; A needs 8 units and B needs 2. FIFO with A first finishes them at 8 and 10, giving mean turnaround 9.
With round-robin quantum 2 and no switching overhead, intervals are A[0,2), B[2,4), then A[4,10). Completions are 10 and 4, mean turnaround 7. B's first response falls from time 8 to 2, while A finishes later. A scheduling choice can improve one metric and worsen another.
Example 2: A smaller quantum is not free
If each context switch costs 0.1 time units, a one-unit useful slice spends about 0.1/1.1, or 9.09%, on switching in a continuously switching workload. A ten-unit slice spends about 0.99%.
Larger slices reduce this modeled overhead but may hurt responsiveness. Real switching costs and cache effects vary; the model makes the tradeoff visible rather than prescribing one universal quantum.
Transfer and self-check
Add a new two-unit job C at time 1. What extra rule must a round-robin trace state? Check: queue insertion and tie-breaking policy, including arrivals at quantum boundaries.
Evidence to keep
Save your first attempt, corrected reasoning, and transfer result as checkpoint evidence. A matching final answer without an explanation is insufficient. Continue with the guided lab and use the reading guide to repair a specific gap.