Library prosa.analysis.facts.busy_interval.ideal.priority_inversion
Require Export prosa.analysis.definitions.priority_inversion.
Require Export prosa.analysis.facts.busy_interval.priority_inversion.
Require Export prosa.analysis.facts.busy_interval.priority_inversion.
Throughout this file, we assume ideal uni-processor schedules.
Require Import prosa.model.processor.ideal.
Require Export prosa.analysis.facts.model.ideal.schedule.
Require Export prosa.analysis.facts.model.ideal.schedule.
Lemmas about Priority Inversion for ideal uni-processors
In this section, we prove a few useful properties about the notion of priority inversion for ideal uni-processors.
Consider any type of tasks ...
... and any type of jobs associated with these tasks.
Context {Job : JobType}.
Context `{JobTask Job Task}.
Context `{JobArrival Job}.
Context `{JobCost Job}.
Context `{JobTask Job Task}.
Context `{JobArrival Job}.
Context `{JobCost Job}.
Consider any arrival sequence with consistent arrivals.
Variable arr_seq : arrival_sequence Job.
Hypothesis H_arrival_times_are_consistent : consistent_arrival_times arr_seq.
Hypothesis H_arrival_times_are_consistent : consistent_arrival_times arr_seq.
Next, consider any ideal uni-processor schedule of this arrival sequence ...
Variable sched : schedule (ideal.processor_state Job).
Hypothesis H_jobs_come_from_arrival_sequence:
jobs_come_from_arrival_sequence sched arr_seq.
Hypothesis H_jobs_come_from_arrival_sequence:
jobs_come_from_arrival_sequence sched arr_seq.
... where jobs do not execute before their arrival or after completion.
Hypothesis H_jobs_must_arrive_to_execute : jobs_must_arrive_to_execute sched.
Hypothesis H_completed_jobs_dont_execute : completed_jobs_dont_execute sched.
Hypothesis H_completed_jobs_dont_execute : completed_jobs_dont_execute sched.
Consider a JLFP-policy that indicates a higher-or-equal priority relation,
and assume that this relation is reflexive.
Let tsk be any task to be analyzed.
Consider a job j of task tsk. In this subsection, job j is
deemed to be the main job with respect to which the priority
inversion is computed.
Consider a time instant t.
We prove that if the processor is idle at time t, then there
is no priority inversion.
Lemma idle_implies_no_priority_inversion :
is_idle sched t →
priority_inversion_dec arr_seq sched j t = false.
is_idle sched t →
priority_inversion_dec arr_seq sched j t = false.
Then, we prove that from point of view of job j, priority
inversion appears iff s has lower priority than job j.
Lemma priority_inversion_equiv_sched_lower_priority :
priority_inversion_dec arr_seq sched j t = ~~ hep_job j' j.
priority_inversion_dec arr_seq sched j t = ~~ hep_job j' j.
Assume that j' has higher-or-equal priority than job j, then
we prove that there is no priority inversion for job j.