Library prosa.analysis.facts.interference
Require Export prosa.analysis.facts.priority.classes.
Require Export prosa.analysis.definitions.interference.
Require Export prosa.analysis.definitions.priority.classes.
Require Export prosa.analysis.facts.model.service_of_jobs.
Require Export prosa.analysis.definitions.interference.
Require Export prosa.analysis.definitions.priority.classes.
Require Export prosa.analysis.facts.model.service_of_jobs.
Auxiliary Lemmas about Interference
Consider any type of tasks ...
... and any type of jobs associated with these tasks.
Consider any kind of processor state model.
Consider any arrival sequence ...
... and any schedule.
Consider a reflexive FP-policy and a JLFP policy compatible with it.
Context {FP : FP_policy Task} {JLFP : JLFP_policy Job}.
Hypothesis H_compatible : JLFP_FP_compatible JLFP FP.
Hypothesis H_reflexive_priorities : reflexive_task_priorities FP.
Hypothesis H_compatible : JLFP_FP_compatible JLFP FP.
Hypothesis H_reflexive_priorities : reflexive_task_priorities FP.
We observe that any higher-priority job must come from a task with
either higher or equal priority.
Lemma another_task_hep_job_split_hp_ep :
∀ j1 j2,
another_task_hep_job j1 j2
= hp_task_hep_job j1 j2 || other_ep_task_hep_job j1 j2.
∀ j1 j2,
another_task_hep_job j1 j2
= hp_task_hep_job j1 j2 || other_ep_task_hep_job j1 j2.
We establish a higher-or-equal job of another task causing interference,
can be due to a higher priority task or an equal priority task.
Lemma hep_interference_another_task_split :
∀ j t,
another_task_hep_job_interference arr_seq sched j t
= hep_job_from_hp_task_interference arr_seq sched j t
|| hep_job_from_other_ep_task_interference arr_seq sched j t.
∀ j t,
another_task_hep_job_interference arr_seq sched j t
= hep_job_from_hp_task_interference arr_seq sched j t
|| hep_job_from_other_ep_task_interference arr_seq sched j t.
Now, assuming a uniprocessor model,...
...the previous lemma allows us to establish that the cumulative interference incurred by a job
is equal to the sum of the cumulative interference from higher-or-equal-priority jobs belonging to
strictly higher-priority tasks (FP) and the cumulative interference from higher-or-equal-priority
jobs belonging to equal-priority tasks (GEL).
Lemma cumulative_hep_interference_split_tasks_new :
∀ j t1 Δ,
cumulative_another_task_hep_job_interference arr_seq sched j t1 (t1 + Δ)
= cumulative_interference_from_hep_jobs_from_hp_tasks arr_seq sched j t1 (t1 + Δ)
+ cumulative_interference_from_hep_jobs_from_other_ep_tasks arr_seq sched j t1 (t1 + Δ).
End InterferenceProperties.
∀ j t1 Δ,
cumulative_another_task_hep_job_interference arr_seq sched j t1 (t1 + Δ)
= cumulative_interference_from_hep_jobs_from_hp_tasks arr_seq sched j t1 (t1 + Δ)
+ cumulative_interference_from_hep_jobs_from_other_ep_tasks arr_seq sched j t1 (t1 + Δ).
End InterferenceProperties.
In the following section, we prove a few properties of
interference under a JLFP policy.
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 kind of fully supply-consuming uniprocessor model.
Context `{PState : ProcessorState Job}.
Hypothesis H_uniprocessor_proc_model : uniprocessor_model PState.
Hypothesis H_consumed_supply_proc_model : fully_consuming_proc_model PState.
Hypothesis H_uniprocessor_proc_model : uniprocessor_model PState.
Hypothesis H_consumed_supply_proc_model : fully_consuming_proc_model PState.
Consider any valid arrival sequence with consistent arrivals ...
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.
... and any uni-processor schedule of this arrival
sequence ...
Variable sched : schedule PState.
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.
Let tsk be any task.
In the following, consider a JLFP-policy that indicates a
higher-or-equal priority relation, and assume that this relation
is reflexive and transitive.
Context {JLFP : JLFP_policy Job}.
Hypothesis H_priority_is_reflexive : reflexive_job_priorities JLFP.
Hypothesis H_priority_is_reflexive : reflexive_job_priorities JLFP.
First, we prove a few rewriting rules under the assumption that
there is no supply.
Consider a time instant t ...
... and assume that there is no supply at t.
Then, there is no interference from higher-or-equal priority
jobs ...
Lemma no_hep_job_interference_without_supply :
∀ j, ~~ another_hep_job_interference arr_seq sched j t.
∀ j, ~~ another_hep_job_interference arr_seq sched j t.
... and that there is no interference from higher-or-equal
priority jobs from other tasks.
Lemma no_hep_task_interference_without_supply :
∀ j, ~~ another_task_hep_job_interference arr_seq sched j t.
End NoSupply.
∀ j, ~~ another_task_hep_job_interference arr_seq sched j t.
End NoSupply.
In the following subsection, we prove properties of the
introduced functions under the assumption that the schedule is
idle.
Consider a time instant t ...
... and assume that the schedule is idle at t.
We prove that in this case: ...
... there is no interference from higher-or-equal priority
jobs ...
... and that there is no interference from higher-or-equal
priority jobs from other tasks.
Lemma no_hep_task_interference_when_idle :
∀ j, ~~ another_task_hep_job_interference arr_seq sched j t.
End Idle.
∀ j, ~~ another_task_hep_job_interference arr_seq sched j t.
End Idle.
Next, we prove properties of the introduced functions under the
assumption that there is supply and the scheduler is not
idle.
Consider a job j of task tsk. In this subsection, job j
is deemed to be the main job with respect to which the
functions are computed.
Consider a time instant t ...
... and assume that there is supply at t.
First, consider a case when some job is scheduled at time t.
Under the stated assumptions, we show that the interference
from another higher-or-equal priority job is equivalent to
the relation another_hep_job.
Lemma interference_ahep_def :
another_hep_job_interference arr_seq sched j t = another_hep_job j' j.
another_hep_job_interference arr_seq sched j t = another_hep_job j' j.
Similarly, we show that the interference from another
higher-or-equal priority job from another task is equivalent
to the relation another_task_hep_job.
Lemma interference_athep_def :
another_task_hep_job_interference arr_seq sched j t = another_task_hep_job j' j.
End SomeJobIsScheduled.
another_task_hep_job_interference arr_seq sched j t = another_task_hep_job j' j.
End SomeJobIsScheduled.
Then there is no interference from higher-or-equal priority
jobs at time t.
Lemma no_ahep_interference_when_scheduled :
~~ another_hep_job_interference arr_seq sched j t.
End JIsScheduled.
~~ another_hep_job_interference arr_seq sched j t.
End JIsScheduled.
Then there is no interference from higher-or-equal priority
jobs at time t.
Lemma no_ahep_interference_when_served :
~~ another_hep_job_interference arr_seq sched j t.
End JIsServed.
~~ another_hep_job_interference arr_seq sched j t.
End JIsServed.
In the next subsection, we consider a case when a job j'
from the same task (as job j) is scheduled.
Variable j' : Job.
Hypothesis H_j'_tsk : job_of_task tsk j'.
Hypothesis H_j'_sched : scheduled_at sched j' t.
Hypothesis H_j'_tsk : job_of_task tsk j'.
Hypothesis H_j'_sched : scheduled_at sched j' t.
Then we show that there is no interference from
higher-or-equal priority jobs of another task.
Lemma no_athep_interference_when_scheduled :
~~ another_task_hep_job_interference arr_seq sched j t.
End FromSameTask.
~~ another_task_hep_job_interference arr_seq sched j t.
End FromSameTask.
In the next subsection, we consider a case when a job j'
from a task other than j's task is scheduled.
Variable j' : Job.
Hypothesis H_j'_not_tsk : ~~ job_of_task tsk j'.
Hypothesis H_j'_sched : scheduled_at sched j' t.
Hypothesis H_j'_not_tsk : ~~ job_of_task tsk j'.
Hypothesis H_j'_sched : scheduled_at sched j' t.
We prove that then j incurs higher-or-equal priority
interference from another task iff j' has higher-or-equal
priority than j.
Hence, if we assume that j' has higher-or-equal priority, ...
... we are able to show that j incurs higher-or-equal
priority interference from another task.
Lemma athep_interference_if :
another_task_hep_job_interference arr_seq sched j t.
End FromDifferentTask.
another_task_hep_job_interference arr_seq sched j t.
End FromDifferentTask.
Variable j' : Job.
Hypothesis H_j'_sched : scheduled_at sched j' t.
Hypothesis H_j'_lp : ~~ hep_job j' j.
Hypothesis H_j'_sched : scheduled_at sched j' t.
Hypothesis H_j'_lp : ~~ hep_job j' j.
We prove that, in this case, there is no interference from
higher-or-equal priority jobs at time t.
Lemma no_ahep_interference_when_scheduled_lp :
~~ another_hep_job_interference arr_seq sched j t.
End LowerPriority.
End SupplyAndScheduledJob.
~~ another_hep_job_interference arr_seq sched j t.
End LowerPriority.
End SupplyAndScheduledJob.
In this section, we prove that the (abstract) cumulative
interference of jobs with higher or equal priority is equal to
total service of jobs with higher or equal priority.
First, let us assume that the introduced processor model is
unit-service.
Variable j : Job.
Hypothesis H_j_arrives : arrives_in arr_seq j.
Hypothesis H_job_of_tsk : job_of_task tsk j.
Hypothesis H_j_arrives : arrives_in arr_seq j.
Hypothesis H_job_of_tsk : job_of_task tsk j.
We consider an arbitrary time interval
[t1, t)
that starts
with a (classic) quiet time.
As follows from lemma cumulative_pred_served_eq_service, the
(abstract) instantiated function of interference is equal to
the total service of any subset of jobs with higher or equal
priority.
The above is in particular true for the jobs other than j
with higher or equal priority...
Lemma cumulative_i_ohep_eq_service_of_ohep :
cumulative_another_hep_job_interference arr_seq sched j t1 t
= service_of_other_hep_jobs arr_seq sched j t1 t.
cumulative_another_hep_job_interference arr_seq sched j t1 t
= service_of_other_hep_jobs arr_seq sched j t1 t.
...and for jobs from other tasks than j with higher
or equal priority.