Community resourceWorksheet
OCR H446 1.2.1 Shortest job and shortest remaining time
Part 6 of 12 · H446 1.2.1 · Systems software
Shortest job first and shortest remaining time sound alike and schedule differently, and the single difference between them, pre-emption, changes the whole timeline. This H446 1.2.1 worksheet works through arrivals and remaining times so students can say which algorithm a given schedule actually demonstrates.
Students will:
- state the decision rule for shortest job first and for shortest remaining time
- explain why both rely on estimated execution times and what inaccurate estimates cost
- trace a schedule in which a later arrival changes which process runs
- recommend one of the two for a service receiving unpredictable short requests
- diagnose a mislabelled schedule and name the algorithm it really shows
Inside: 5 explanation cells, 4 multiple-choice questions, 3 fill-in-the-blanks cells and 4 written answers. 32 marks, about 40 to 50 minutes.
Series: H446 1.2.1 · Systems software, part 6 of 12.
Shared by Coding PathwayVerified teacher
- 16 cells
- About 45 minutes
- CC BY-SA 4.0
- Shared 31 Aug 2026
- Updated 3 Sept 2026
Preview
The whole resource, exactly as a class sees it. Answers and marking are held back.
Shortest job and shortest remaining time
Two OCR scheduling algorithms prioritise estimated execution time. Their names are close, but one crucial difference changes the schedule: shortest job first (SJF) is normally non-pre-emptive, while shortest remaining time (SRT) can pre-empt a running process.
You should already know: ready/running states and what pre-emption means from round robin.
Worked distinction
SJF: choose the shortest complete job from the ready queue. Once selected, let it run until it finishes or blocks. A shorter job arriving later does not automatically replace it.
SRT: continually prefer the process with the shortest time still needed. If a new process arrives with less required time than the current process has remaining, suspend the current process and run the newcomer.
Both depend on estimates of execution time. A long process can wait repeatedly if shorter work keeps arriving.
What is the key difference between SJF and SRT?
- ASRT may pre-empt the current process when a shorter remaining job arrives
- BSJF uses arrival order while SRT uses no queue
- CSJF uses a fixed quantum for every process
- DSRT always chooses the longest job
| Job | Required CPU time |
|---|---|
| A | 6 |
| B | 2 |
| C | 4 |
Explain why SJF and SRT require the scheduler to estimate process execution times and why inaccurate estimates can be a problem.
Give the mechanism and one scheduling consequence.
Students type their answer here.
Worked SRT timeline
Process A arrives at time 0 needing 7 ticks. It runs for 2 ticks, so 5 remain. At time 2, B arrives needing 3 ticks.
B has 3 ticks compared with A's 5 remaining, so B pre-empts A. B finishes at time 5. A then resumes with 5 ticks remaining and finishes at time 10.
The comparison is always between remaining times at that moment, not the original job lengths.
A running process has 4 ticks remaining. A new process arrives needing 6 ticks. What does SRT do?
- APre-empt immediately because every new job has priority
- BKeep the current process running because 4 is less than 6
- CSwitch to FCFS
- DBlock both processes
A 20-tick SJF job has just started. One tick later, a 2-tick job arrives. Assuming the current job does not block, what happens?
- AThe 2-tick job immediately pre-empts
- BBoth jobs receive alternating quanta
- CThe current 20-tick job continues until it finishes
- DThe scheduler deletes the longer job
Compare how SJF and SRT respond when a short process arrives after a longer process has begun running.
Use the terms non-pre-emptive, pre-emptive and remaining time.
Students type their answer here.
What is a possible drawback shared by shortest-time algorithms?
- ANo process can ever finish
- BThey require every process to have equal length
- CThey cannot use a ready queue
- DLong jobs may wait for a very long time if shorter jobs keep arriving
An emergency data-analysis service receives unpredictable short requests while a long background report is running. Recommend SJF or SRT for responding quickly to newly arriving short requests and justify the choice.
State the chosen mechanism and link it to the scenario; include one trade-off.
Students type their answer here.
A schedule labelled SJF switches away from a running job as soon as a shorter job arrives. Diagnose the error and state which algorithm the schedule actually demonstrates.
Name the violated property and the correct algorithm.
Students type their answer here.
Closed-book checkpoint
Complete the contrast from memory. Checking is held for teacher review.
Review your understanding
Before submitting, check that you can explain the main distinction in your own words, apply it in an unfamiliar context and justify each consequence rather than only naming a feature.