Library prosa.results.edf.optimality

Optimality of EDF on Ideal Uniprocessors

This module provides the famous EDF optimality theorem: if there is any way to meet all deadlines (assuming an ideal uniprocessor schedule), then there is also an (ideal) EDF schedule in which all deadlines are met.
The following results assume ideal uniprocessor schedules...
... and the basic (i.e., Liu & Layland) readiness model under which any pending job is always ready.

Optimality Theorem


Section Optimality.
For any given type of jobs, each characterized by execution costs, an arrival time, and an absolute deadline,...
  Context {Job : JobType} `{JobCost Job} `{JobDeadline Job} `{JobArrival Job}.

... and any valid job arrival sequence.
We observe that EDF is optimal in the sense that, if there exists any schedule in which all jobs of arr_seq meet their deadline, then there also exists an EDF schedule in which all deadlines are met.

Weak Optimality Theorem

We further state a weaker notion of the above optimality result that avoids a dependency on a given arrival sequence. Specifically, it establishes that, given a reference schedule without deadline misses, there exists an EDF schedule of the same jobs in which no deadlines are missed.
Section WeakOptimality.

For any given type of jobs, each characterized by execution costs, an arrival time, and an absolute deadline,...
  Context {Job : JobType} `{JobCost Job} `{JobDeadline Job} `{JobArrival Job}.

... if we have a well-behaved reference schedule ...
... in which no deadlines are missed, ...
...then there also exists an EDF schedule in which no deadlines are missed (and in which exactly the same set of jobs is scheduled, as ensured by the last clause).
  Theorem weak_EDF_optimality:
     edf_sched : schedule (ideal.processor_state Job),
      jobs_must_arrive_to_execute edf_sched
      completed_jobs_dont_execute edf_sched
      all_deadlines_met edf_sched
      EDF_schedule edf_sched
       j,
          ( t, scheduled_at any_sched j t)
          ( t', scheduled_at edf_sched j t').

End WeakOptimality.