Library prosa.results.generality.elf

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 it trivially generalizes by design.
  Section ELFGeneralizesGEL.

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

... then the ELF policy reduces to GEL.
    Remark ELF_generalizes_GEL :
       (JLFP : JLFP_policy Job),
        policy_is_ELF FP JLFP policy_is_GEL JLFP.

  End ELFGeneralizesGEL.

ELF Generalizes Fixed-Priority Scheduling

Next, let us turn to fixed-priority scheduling, which by design ELF also generalizes under certain assumptions.
Assume that the underlying task-priority relation has the usual order properties.
Consider a JLFP policy that behaves as an ELF policy.
    Context {JLFP : JLFP_policy Job}.
    Hypothesis H_policy_is_ELF : policy_is_ELF FP JLFP.

Since ELF never inverts fixed task priority, an ELF schedule is always also valid with respect to the underlying task-level FP policy.
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, note that FP-compliance does not constrain jobs of the same task, whereas a given ELF policy may resolve ties arbitrarily when both jobs have the same task priority and the same priority point. Hence, in the only ambiguous case, we explicitly rule out tie-breaking that disagrees with the required job-level priority order.
    Hypothesis H_no_tiebreak :
       j j',
        ep_task (job_task j) (job_task j')
        job_priority_point j = job_priority_point j'
        hep_job j j'.

Second, assume that task priorities are indeed distinct.
    Hypothesis H_distinct_fixed_priorities :
       tsk1 tsk2, tsk1 != tsk2 ~~ ep_task tsk1 tsk2.

Third, 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.