Library prosa.model.task.preemption.floating_nonpreemptive
Require Import prosa.model.preemption.limited_preemptive.
Require Export prosa.model.task.preemption.parameters.
Require Export prosa.model.task.preemption.parameters.
Task Model with Floating Non-Preemptive Regions
Model Validity
Consider any type of tasks ... 
... with a bound on the maximum non-preemptive segment length ... 
 ... and any type of limited-preemptive jobs associated with these tasks ... 
... with execution costs and specific preemption points. 
Consider any arrival sequence. 
We require task_max_nonpreemptive_segment (job_task j) to be an upper
      bound of the length of the maximum nonpreemptive segment of job j. 
  Definition job_respects_task_max_np_segment :=
∀ (j : Job),
arrives_in arr_seq j →
job_max_nonpreemptive_segment j ≤ task_max_nonpreemptive_segment (job_task j).
∀ (j : Job),
arrives_in arr_seq j →
job_max_nonpreemptive_segment j ≤ task_max_nonpreemptive_segment (job_task j).
A model with floating nonpreemptive regions is valid if it is both valid
      a the job level and jobs respect the upper bound of their task. 
  Definition valid_model_with_floating_nonpreemptive_regions :=
valid_limited_preemptions_job_model arr_seq ∧
job_respects_task_max_np_segment.
End ValidModelWithFloatingNonpreemptiveRegions.
valid_limited_preemptions_job_model arr_seq ∧
job_respects_task_max_np_segment.
End ValidModelWithFloatingNonpreemptiveRegions.
Run-to-Completion Threshold
Consider any type of tasks with a WCET bound.
In the model with floating non-preemptive regions, there is no static
      information about the placement of preemption points in all jobs, i.e.,
      it is impossible to predict when exactly a job will be preemptable. Thus,
      the only safe run-to-completion threshold is task cost. 
  Global Program Instance fully_preemptive : TaskRunToCompletionThreshold Task :=
{
task_run_to_completion_threshold (tsk : Task) := task_cost tsk
}.
End TaskRTCThresholdFloatingNonPreemptiveRegions.
{
task_run_to_completion_threshold (tsk : Task) := task_cost tsk
}.
End TaskRTCThresholdFloatingNonPreemptiveRegions.