Library prosa.analysis.facts.preemption.task.limited
Require Export prosa.analysis.facts.preemption.job.limited.
Require Export prosa.model.task.preemption.limited_preemptive.
Require Export prosa.model.task.preemption.limited_preemptive.
Platform for Models with Limited Preemptions
In this section, we prove that instantiation of functions job_preemptable and task_preemption_points to the limited preemptions model indeed defines a valid preemption model with bounded non-preemptive regions.
Consider any type of tasks ...
... and any type of jobs associated with these tasks.
We assume that jobs are preemptable only at specific points during their
execution, ...
... i.e., we assume limited-preemptive jobs.
Consider any arrival sequence.
Next, consider any preemption-aware schedule of this arrival sequence.
Context {PState : ProcessorState Job}.
Variable sched : schedule PState.
Hypothesis H_schedule_respects_preemption_model :
schedule_respects_preemption_model arr_seq sched.
Variable sched : schedule PState.
Hypothesis H_schedule_respects_preemption_model :
schedule_respects_preemption_model arr_seq sched.
Consider an arbitrary task set ts.
Next, we assume that preemption points are defined by the model
with fixed preemption points.
Then we prove that functions job_preemptable and
task_preemption_points define a model with bounded non-preemptive
regions.
Lemma fixed_preemption_points_model_is_model_with_bounded_nonpreemptive_regions :
model_with_bounded_nonpreemptive_segments arr_seq .
model_with_bounded_nonpreemptive_segments arr_seq .
Which together with lemma valid_fixed_preemption_points_model
gives us the fact that functions job_preemptable and
task_preemption_points define a valid preemption model with
bounded non-preemptive regions.
Corollary fixed_preemption_points_model_is_valid_model_with_bounded_nonpreemptive_regions :
valid_model_with_bounded_nonpreemptive_segments arr_seq sched.
valid_model_with_bounded_nonpreemptive_segments arr_seq sched.
We show that, under the fixed-preemption-points model, the
maximum non-preemptive segment of each task in ts does not
exceed the task's WCET.
Lemma task_max_nps_le_task_cost :
∀ tsk, tsk \in ts → task_max_nonpreemptive_segment tsk ≤ task_cost tsk.
End LimitedPreemptionsModel.
∀ tsk, tsk \in ts → task_max_nonpreemptive_segment tsk ≤ task_cost tsk.
End LimitedPreemptionsModel.
We add the above lemmas into a "Hint Database" basic_rt_facts, so Rocq will be able to apply them automatically.
Global Hint Resolve
valid_fixed_preemption_points_model_lemma
fixed_preemption_points_model_is_model_with_bounded_nonpreemptive_regions
fixed_preemption_points_model_is_valid_model_with_bounded_nonpreemptive_regions
task_max_nps_le_task_cost : basic_rt_facts.
valid_fixed_preemption_points_model_lemma
fixed_preemption_points_model_is_model_with_bounded_nonpreemptive_regions
fixed_preemption_points_model_is_valid_model_with_bounded_nonpreemptive_regions
task_max_nps_le_task_cost : basic_rt_facts.