Short answer: Earliest deadline first schedules a single processor by always running the ready job whose absolute deadline is soonest. For periodic implicit-deadline tasks, the schedule meets every deadline if and only if the total utilization is at most 1. The test is necessary and sufficient on one preemptive processor. It is not sufficient on multiprocessors, and it is not the same as rate-monotonic scheduling, which uses fixed priorities.
What the problem actually asks
A periodic task releases a job every period and, in the implicit-deadline model, that job must finish before the next release. A dynamic priority that equals the absolute deadline prefers the job that is closest to being late. Preemption is allowed. The resulting schedule is optimal on one processor: if any schedule meets all the deadlines, this one does.
The utilization test follows. Each task i contributes C_i/T_i, execution over period. If the sum exceeds 1, no scheduler works, because the processor is oversubscribed. If the sum is at most 1, EDF works for implicit deadlines. Rate-monotonic scheduling can fail on a task set that fits under this sum, because its fixed-priority bound is stricter.
What the algorithm guarantees
On one preemptive processor, implicit deadlines, and independent tasks, EDF meets every deadline exactly when utilization is at most 1. The online rule is a priority queue keyed by absolute deadline. Context-switch accounting is ignored in the classic theorem. Extra memory is the ready queue. A deadline that is not equal to the period, a constrained or arbitrary deadline, needs a different test, response-time analysis or a demand bound, not the plain sum of utilizations.
Multiprocessor EDF is not optimal. A task set with utilization at most m can miss deadlines under global EDF. The one-processor theorem does not scale by replacing 1 with m.
The working steps
- On each release, compute the job’s absolute deadline, the release time plus the relative deadline, and insert the job into a priority queue.
- Always run the queued job with the earliest absolute deadline. Preempt the current job when a newly released job has an earlier deadline.
- For implicit-deadline periodic tasks on one processor, accept the task set when the sum of C_i/T_i is at most 1.
- If the sum exceeds 1, no preemptive scheduler meets every deadline. Reject the task set or move work off the processor.
- Do not apply the same sum, with 1 replaced by the number of processors, as a sufficient multiprocessor test.
The utilization bound is a one-processor, implicit-deadline result. Rate-monotonic scheduling assigns a fixed priority by period and has a lower sufficient bound, n(2^{1/n}−1). A job that blocks on a lock needs an inheritance protocol before either theorem applies. EDF is the dynamic-priority rule.
Approaches that look simpler and fail
| Approach | Why it fails when the one-processor bound is copied onto several processors |
|---|---|
| Accept a multiprocessor task set whenever utilization is at most the number of processors | Global EDF can miss deadlines on such a set. The necessity of the utilization cap remains. The sufficiency does not. |
| Use a fixed priority equal to the task’s first deadline | That freezes the priority. EDF recomputes the absolute deadline of each new job. Fixed period priorities are rate-monotonic scheduling. |
| Apply the sum test when deadlines are shorter than periods | The implicit-deadline proof used deadline equals period. A shorter deadline needs a demand-bound test. |
| Ignore preemption in the analysis and also forbid it in the scheduler | The optimality claim is preemptive. A nonpreemptive EDF variant misses deadlines the preemptive schedule would have met. |
Fixed priorities by period are rate-monotonic scheduling. Multiprocessor partitioned scheduling assigns tasks to processors and then uses a one-processor test on each. EDF is the one-processor dynamic-deadline policy.
A working example
This Python fragment always runs the ready job with the earliest absolute deadline. Two implicit-deadline tasks, costs 1 and 2 and periods 2 and 4, have utilization 1. Over one hyperperiod every job finishes by its deadline. It prints met.
# releases at t=0,2 for task A (C=1,T=2,D=2); t=0 for task B (C=2,T=4,D=4)
jobs = []
for t in range(0, 4, 2):
jobs.append([t, t + 2, 1, "A"]) # release, deadline, remaining, name
jobs.append([0, 4, 2, "B"])
t = 0
while t < 4:
ready = [j for j in jobs if j[0] <= t and j[2] > 0]
ready.sort(key=lambda j: j[1])
job = ready[0]
job[2] -= 1
t += 1
for j in jobs:
if t > j[1] and j[2] > 0:
raise SystemExit("missed")
print("met")
Where it is used
Linux SCHED_DEADLINE schedules real-time tasks by earliest deadline first. A task with the soonest deadline runs, which is the policy the EDF admission test analyzes. Rate-monotonic scheduling assigns fixed priorities instead of deadlines.
When you can drop this algorithm
Drop the utilization sum as a multiprocessor acceptance test. Use a multiprocessor analysis. Keep EDF on one preemptive processor, where utilization at most 1 is necessary and sufficient for implicit deadlines.
Why this stays published
We publish this so a search for earliest deadline first returns the utilization test of 1 and the reason that test is not a multiprocessor theorem. Earliest deadline first meets every implicit deadline on one preemptive processor if and only if total utilization is at most 1.
本文由 HoHo 與 AI 協作整理,最後更新於 2026 年 11 月 13 日。
