Library prosa.implementation.facts.ideal_uni.prio_aware

Ideal Uniprocessor Scheduler Properties

This file establishes facts about the reference model of a priority- and preemption-model-aware ideal uniprocessor scheduler.
Consider any type of jobs with costs and arrival times, ...
  Context {Job : JobType} {JC : JobCost Job} {JA : JobArrival Job}.

... in the context of an ideal uniprocessor model.
Suppose we are given a valid arrival sequence of such jobs, ...
... a non-clairvoyant readiness model, ...
... a preemption model, ...
  Context `{JobPreemptable Job}.

... and a total and transitive JLDP priority policy.
  Context {JLDP : JLDP_policy Job}.
  Hypothesis H_total : total_priorities JLDP.
  Hypothesis H_transitive : transitive_priorities JLDP.

Consider the schedule generated by the preemption-policy- and priority-aware ideal uniprocessor scheduler...
...and assume that the preemption model is consistent with the readiness model.
First, we note that the priority-aware job selection policy obviously maintains work-conservation.
Second, we similarly note that schedule validity is also maintained.
The schedule also respects the given readiness model.
Third, the schedule respects also the preemption model semantics.
  Section PreemptionCompliance.

Suppose that every job in arr_seq adheres to the basic validity requirement that jobs must start execution to become nonpreemptive.
    Hypothesis H_valid_preemption_function :
      ∀ j,
        arrives_in arr_seq j →
        job_cannot_become_nonpreemptive_before_execution j.

Since uni_schedule arr_seq is an instance of np_uni_schedule, the compliance of schedule with the preemption model follows trivially from the compliance of np_uni_schedule.
Now we proceed to the main property of the priority-aware scheduler: in the following section we establish that uni_schedule arr_seq is compliant with the given priority policy whenever jobs are preemptable.
For notational convenience, recall the definitions of the job-selection policy and a prefix of the schedule based on which the next decision is made.
To start, we observe that, at preemption times, the scheduled job is a supremum w.r.t. the priority order and the set of backlogged jobs.
From the preceding facts, we conclude that uni_schedule arr_seq respects the priority policy.