Library prosa.results.elf.generality

Generality of ELF

In the following, we make some formal remarks on the obvious generality of ELF w.r.t. Fixed Priority and GEL.
We begin with the general setup.
Section GeneralityOfELF.

Consider any type of tasks with relative priority points,...
  Context {Task : TaskType} `{PriorityPoint Task}.

...jobs of these tasks, and ...
  Context {Job : JobType} `{JobArrival Job} `{JobTask Job Task}.

... any processor model.
  Context {PState : ProcessorState Job}.

Suppose the jobs have arrival times and costs, and allow for any preemption and readiness models.
Suppose fp is the fixed-priority policy that parameterizes the ELF policy.
  Variable fp: FP_policy Task.

ELF Generalizes GEL

First, let us consider GEL scheduling, which by design ELF trivially generalizes.
  Section ELFGeneralizesGEL.

If the fp fixed-priority policy assigns equal priority to all tasks...
  Hypothesis H_FP_policy_is_same:
     tsk1 tsk2, ep_task tsk1 tsk2.

... then the ELF policy reduces to GEL.

ELF Generalizes Fixed-Priority Scheduling

Next, let us turn to fixed-priority scheduling, which by design ELF also generalizes under certain assumptions.
Since (1) ELF uses GEL only to break ties in fixed task priority, and since (2) a fixed-priority policy says nothing about how jobs of equal-priority tasks should be ordered (i.e., "ties in priority are broken arbitrarily"), an ELF fp schedule always is also a valid fp schedule.
Additionally, if each task has a distinct priority, or equivalently, no two tasks have equal priority according to the fp fixed-priority policy, then the reverse also holds: the ELF policy reduces to the underlying FP policy. To show this, we require some additional setup and assumptions.
First, assume that task priorities are indeed distinct.
    Hypothesis H_distinct_fixed_priorities:
       tsk1 tsk2, tsk1 != tsk2 ~~ ep_task tsk1 tsk2.

Second, consider any given valid arrival sequence.
Then in any given valid schedule ...
    Variable sched : schedule PState.
    Hypothesis H_sched_valid : valid_schedule sched arr_seq.

... in which tasks execute sequentially ...
    Hypothesis H_sequential : sequential_tasks arr_seq sched.

... the ELF policy and the underlying FP policy are equivalent.