Skip to article
ContentsSRTF checkpoints
Learn/Chapter 04 of 08

App-specific teaching variant

SRTF at Execution Checkpoints

This teaching variant uses the shortest-remaining-work rule at selected decision points instead of reconsidering immediately on every arrival. Arrivals join Ready as soon as they occur, but they do not interrupt before the current execution checkpoint. Completion also creates a decision point.

The rule in this application

The check interval counts CPU execution from the current dispatch or previous check. Waiting and dispatch overhead do not spend that interval. This is an application variant for studying delayed scheduling decisions. It is not a separate standard algorithm, and its results differ from continuous SRTF.

Worked example: check interval 3

Example inputs
ProcessArrivalBurst
P107
P213
P321
Scroll horizontally for all columns

One CPU · One burst per process · No I/O · Dispatch cost 0 · Check interval 3. Times are abstract units.

Arrivals join Ready, but selection waits until an execution checkpoint or completion. At the first checkpoint, 3, P1 has 4, P2 has 3, P3 has 1 units left. P3 is selected.

P1 later runs from 7 to its next checkpoint at 10: 3 units of actual CPU service. Checkpoints are relative to execution, not a global time grid. The full trace is P1 [0, 3), P3 [3, 4), P2 [4, 7), P1 [7, 11).

Worked trace SRTF checkpoints
Arrivals wait for a decision.

Arrivals join Ready, but selection waits until an execution checkpoint or completion. At the first checkpoint, 3, P1 has 4, P2 has 3, P3 has 1 units left. P3 is selected.

P1 later runs from 7 to its next checkpoint at 10: 3 units of actual CPU service. Checkpoints are relative to execution, not a global time grid. The full trace is P1 [0, 3), P3 [3, 4), P2 [4, 7), P1 [7, 11).

CPU execution: SRTF checkpointsP1 runs [0, 3); P3 runs [3, 4); P2 runs [4, 7); P1 runs [7, 11). Segment widths show elapsed time. Diamond markers show arrivals. ARRIVALSP1P2P3P1P3P2P1034711103 CPU units → check3 CPU units → check
Scroll horizontally for all intervals
Complete CPU trace · [start, end)
  1. P1: [0, 3)
  2. P3: [3, 4)
  3. P2: [4, 7)
  4. P1: [7, 11)

Checkpoints at 3, 10. Same-owner continuation at 10.

Checkpoints are relative to execution. A completion can trigger a decision earlier, and a checkpoint does not require a process change.
Open this example in the simulator

Calculate the result

Per-process results
ProcessCompletionWaitingTurnaroundResponse
P1114110
P27363
P34121
Scroll horizontally for all columns

P2: turnaround = 7 − 1 = 6. Waiting = 6 − 3 = 3. First response = 4 − 1 = 3.

P2 and P3 first start at 4 and 3 here, versus 1 and 2 with continuous SRTF. These differences show the effect of postponing a decision.

Mean waiting = (4 + 3 + 1) / 3 ≈ 2.667 units. Mean response ≈ 1.333 units.

Check interval and quantum serve different purposes

A checkpoint asks which eligible process has the least remaining work. Round Robin instead gives the next FIFO process a turn. Reaching a checkpoint does not move the current process to the back of a FIFO rotation.

The app models configured dispatch overhead, not an extra computational cost for every comparison or checkpoint.