Library prosa.analysis.abstract.restricted_supply.task_intra_interference_bound

Task Intra-Supply Interference is Bounded

In this file, we define the task intra-supply IBF task_intra_IBF assuming that we have two functions: one bounding service inversion and the other bounding the higher-or-equal-priority workload (w.r.t. a job under analysis). We then prove that task_intra_IBF indeed bounds the cumulative task intra-supply interference.
Consider any type of tasks ...
  Context {Task : TaskType}.

... and any type of jobs associated with these tasks.
  Context {Job : JobType}.
  Context {Cost : JobCost Job}.
  Context `{JobArrival Job}.
  Context `{JobTask Job Task}.

Consider any kind of fully supply-consuming unit-supply uniprocessor model.
Consider a JLFP policy that indicates a higher-or-equal-priority relation, and assume that the relation is reflexive.
Note that we do not relate the JLFP policy with the scheduler. However, we define functions for Interference and Interfering Workload that actively use the concept of priorities. We require the JLFP policy to be reflexive, so a job cannot cause lower-priority interference (i.e. priority inversion) to itself.
We also assume that the policy respects sequential tasks, meaning that later-arrived jobs of a task don't have higher priority than earlier-arrived jobs of the same task.
Consider any valid arrival sequence ...
... and a schedule of this arrival sequence ...
... where jobs do not execute before their arrival nor after completion.
We say that job j incurs interference at time t iff it cannot execute due to (1) the lack of supply at time t, (2) service inversion (i.e., a lower-priority job receiving service at t), or a higher-or-equal-priority job receiving service.
The interfering workload, in turn, is defined as the sum of the blackout predicate, service-inversion predicate, and the interfering workload of jobs with higher or equal priority.
Let tsk be any task to be analyzed.
  Variable tsk : Task.

Assume that there exists a bound on the length of any service inversion experienced by any job of task tsk.
Assume that there exists a bound on the higher-or-equal-priority (w.r.t. a tsk's job) workload of tasks different from tsk.
Finally, we define the interference-bound function (task_intra_IBF).
Next, we prove that task_intra_IBF is indeed an interference bound.
  Lemma instantiated_task_intra_interference_is_bounded :
    task_intra_interference_is_bounded_by
      arr_seq sched tsk task_intra_IBF.
  Proof.
    movet1 t2 Δ j ARR TSK BUSY LT NCOMPL A OFF.
    move: (OFF _ _ BUSY) ⇒ EQA; subst A.
    have [ZERO|POS] := posnP (@job_cost _ Cost j).
    { by exfalso; rewrite /completed_by ZERO in NCOMPL. }
    eapply leq_trans; first by eapply cumulative_task_interference_split ⇒ //.
    rewrite /task_intra_IBF leq_add//.
    { apply leq_trans with (cumulative_service_inversion arr_seq sched j t1 (t1 + Δ)); first by done.
      apply leq_trans with (cumulative_service_inversion arr_seq sched j t1 t2); last first.
      { apply: H_service_inversion_is_bounded; eauto 2 ⇒ //.
        apply abstract_busy_interval_classic_busy_interval_prefix ⇒ //. }
      by rewrite [X in _ X](@big_cat_nat _ _ _ (t1 + Δ)) //= leq_addr. }
    { erewrite cumulative_i_thep_eq_service_of_othep; eauto 2 ⇒ //; last first.
      { by apply instantiated_quiet_time_equivalent_quiet_time ⇒ //; apply BUSY. }
      apply: leq_trans.
      { by apply service_of_jobs_le_workload ⇒ //; apply unit_supply_is_unit_service. }
      { by apply H_workload_is_bounded ⇒ //; apply: abstract_busy_interval_classic_quiet_time ⇒ //. }
    }
  Qed.

End TaskIntraInterferenceIsBounded.