Library prosa.results.generality.gel
Require Export prosa.util.int.
Require Export prosa.model.schedule.priority_driven.
Require Export prosa.model.priority.gel.
Require Import prosa.model.task.absolute_deadline.
Require Export prosa.analysis.facts.priority.classes.
Require Export prosa.analysis.facts.priority.edf.
Require Export prosa.analysis.facts.priority.gel.
Require Export prosa.analysis.facts.priority.fifo.
Require Export prosa.model.schedule.priority_driven.
Require Export prosa.model.priority.gel.
Require Import prosa.model.task.absolute_deadline.
Require Export prosa.analysis.facts.priority.classes.
Require Export prosa.analysis.facts.priority.edf.
Require Export prosa.analysis.facts.priority.gel.
Require Export prosa.analysis.facts.priority.fifo.
Generality of GEL
Consider any type of tasks with relative priority points, ...
... jobs of these tasks, and ...
... any processor model.
Suppose the jobs have arrival times and costs, and allow for any preemption
and readiness models.
Context {Arrival : JobArrival Job} {Cost : JobCost Job}
`{JobPreemptable Job} {JR : @JobReady Job PState Cost Arrival}.
`{JobPreemptable Job} {JR : @JobReady Job PState Cost Arrival}.
GEL Generalizes EDF
Suppose the tasks have relative deadlines.
If each task's priority point is set to its relative deadline, ...
... then the GEL policy reduces to EDF.
Remark gel_generalizes_edf :
∀ (JLFP : JLFP_policy Job),
policy_is_GEL JLFP ↔ policy_is_EDF JLFP.
End GELGeneralizesEDF.
∀ (JLFP : JLFP_policy Job),
policy_is_GEL JLFP ↔ policy_is_EDF JLFP.
End GELGeneralizesEDF.
If each task's priority point is set to zero, ...
... then the GEL policy reduces to FIFO.
Remark gel_generalizes_fifo :
∀ (JLFP : JLFP_policy Job),
policy_is_GEL JLFP ↔ policy_is_FIFO JLFP.
End GELGeneralizesFIFO.
∀ (JLFP : JLFP_policy Job),
policy_is_GEL JLFP ↔ policy_is_FIFO JLFP.
End GELGeneralizesFIFO.
GEL Conditionally Generalizes FP
Consider GEL scheduling with arbitrary tie-breaking ...
... and an arbitrary valid arrival sequence.
Variable arr_seq : arrival_sequence Job.
Hypothesis H_valid_arrival_sequence : valid_arrival_sequence arr_seq.
Hypothesis H_valid_arrival_sequence : valid_arrival_sequence arr_seq.
For ease of reference, we refer to the difference between the relative
priority points of two given tasks as pp_delta.
Before we tackle the conditional equivalence, we first establish a
helper lemma on the priority of backlogged jobs that sits at the core of
the argument.
...an arbitrary schedule, ...
... and an arbitrary point in time t.
... and that the difference between the priority points of the two
tasks bounds the maximum response time of j' in sched.
We are now ready to state the auxiliary lemma: under the above
assumptions, if j has arrived by time t and j' is backlogged,
then j's priority under GEL is higher than or equal to j''s
priority.
Lemma backlogged_job_has_lower_gel_prio :
has_arrived j t →
backlogged sched j' t →
hep_job j j'.
End GELPrioOfBackloggedJob.
has_arrived j t →
backlogged sched j' t →
hep_job j j'.
End GELPrioOfBackloggedJob.
With the auxiliary lemma in place, we now state the main assumptions
under which conditional generality can be shown.
Consider any given reflexive and total fixed-priority policy.
Variable FP : FP_policy Task.
Hypothesis H_reflexive : reflexive_task_priorities FP.
Hypothesis H_total : total_task_priorities FP.
Hypothesis H_reflexive : reflexive_task_priorities FP.
Hypothesis H_total : total_task_priorities FP.
We require that the priorities of tasks that feature in the schedule are
unique. That is, no two tasks that contribute jobs to the arrival
sequence share a fixed priority.
Hypothesis H_unique_fixed_priorities :
∀ j j',
arrives_in arr_seq j →
arrives_in arr_seq j' →
~~ same_task j j' →
hep_task (job_task j) (job_task j') →
hp_task (job_task j) (job_task j').
∀ j j',
arrives_in arr_seq j →
arrives_in arr_seq j' →
~~ same_task j j' →
hep_task (job_task j) (job_task j') →
hp_task (job_task j) (job_task j').
We further require that the assigned relative priority points are
monotonic with decreasing task priority: the relative priority point
offset of a lower-priority task must not be less than that of any
higher-priority task (that features in the arrival sequence).
Hypothesis H_hp_delta_pos :
∀ j j',
arrives_in arr_seq j →
arrives_in arr_seq j' →
hp_task (job_task j) (job_task j') →
(pp_delta (job_task j) (job_task j') > 0)%R.
∀ j j',
arrives_in arr_seq j →
arrives_in arr_seq j' →
hp_task (job_task j) (job_task j') →
(pp_delta (job_task j) (job_task j') > 0)%R.
To state the third and fourth assumptions, we require an arbitrary,
valid schedule to be given.
We require that the difference in relative priority points between a
higher- and lower-priority task exceeds the maximum response time of the
lower-priority task in the given schedule. In other words, the priority
points of lower-priority tasks must be chosen to be "large enough" to be
sufficiently far enough in the future to avoid interfering with any
concurrently pending jobs of higher-priority tasks.
Hypothesis H_hp_delta_rtb :
∀ j j',
arrives_in arr_seq j →
arrives_in arr_seq j' →
hp_task (job_task j) (job_task j') →
job_response_time_bound sched j' `|pp_delta (job_task j) (job_task j')|.
∀ j j',
arrives_in arr_seq j →
arrives_in arr_seq j' →
hp_task (job_task j) (job_task j') →
job_response_time_bound sched j' `|pp_delta (job_task j) (job_task j')|.
FP-compliance does not constrain jobs of the same task, whereas a
given GEL policy may resolve ties arbitrarily when both jobs have 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',
same_task j j' →
job_priority_point j = job_priority_point j' →
hep_job j j'.
∀ j j',
same_task j j' →
job_priority_point j = job_priority_point j' →
hep_job j j'.
Finally, we require that tasks execute sequentially.
Under the four conditions stated above, GEL generalizes the given FP
policy.