Library prosa.analysis.facts.model.exceedance.SBF
Require Export prosa.analysis.facts.model.ideal_uni_exceed.
Require Export prosa.analysis.definitions.sbf.sbf.
Require Export prosa.analysis.definitions.sbf.busy.
Require Export prosa.model.processor.ideal_uni_exceed.
Require Export prosa.analysis.definitions.sbf.sbf.
Require Export prosa.analysis.definitions.sbf.busy.
Require Export prosa.model.processor.ideal_uni_exceed.
In this file, we instantiate the supply-bound function for ideal uniprocessors
with exceedance.
Let us state the definition first.
Let e be the bound on exceedance in any busy window.
Then, the SBF is defined as follows.
Next, we establish some facts about the above-defined SBF.
Consider tasks characterized by nominal execution times ...
... and their associated jobs with costs and arrival times.
Consider any JLFP policy.
Assume an arrival sequence ...
... and a corresponding ideal uniprocessor schedule subject to exceedance.
Assume e is the bound on exceedance in a busy interval ...
... of a given task tsk.
Let us state the exceedance using Instance to make it locally available
to the typeclasses database.
Let us formally state the assumption that the total exceedance inside
the busy interval of tsk is bounded by e.
Hypothesis H_exceedance_in_busy_interval_bounded :
∀ j t1 t2,
arrives_in arr_seq j →
job_of_task tsk j →
busy_interval_prefix arr_seq sched j t1 t2 →
\sum_(t1 ≤ t < t2) is_exceedance_exec (sched t) ≤ e.
∀ j t1 t2,
arrives_in arr_seq j →
job_of_task tsk j →
busy_interval_prefix arr_seq sched j t1 t2 →
\sum_(t1 ≤ t < t2) is_exceedance_exec (sched t) ≤ e.
Since we model exceedance as blackouts, we trivially have that the
blackouts are bounded by e.
Lemma blackout_during_bounded j t1 t2 t :
arrives_in arr_seq j →
job_of_task tsk j →
busy_interval_prefix arr_seq sched j t1 t2 →
t1 ≤ t ≤ t2 →
blackout_during sched t1 t ≤ e.
Proof.
move ⇒ ARRIN TSK PRE /andP[INEQ1 INEQ2].
rewrite /blackout_during.
rewrite (eq_sum_seq _ _ _ _ (fun t ⇒ is_exceedance_exec (sched t))).
- specialize ( H_exceedance_in_busy_interval_bounded j t1 t2 ).
feed_n 3 H_exceedance_in_busy_interval_bounded ⇒ //=.
apply: leq_trans; last by apply H_exceedance_in_busy_interval_bounded.
rewrite (big_cat_nat _ INEQ2) //=.
by lia.
- move ⇒ t' /[!mem_index_iota]IN _.
rewrite blackout_implies_exceedance_execution.
by apply /eqP.
Qed.
arrives_in arr_seq j →
job_of_task tsk j →
busy_interval_prefix arr_seq sched j t1 t2 →
t1 ≤ t ≤ t2 →
blackout_during sched t1 t ≤ e.
Proof.
move ⇒ ARRIN TSK PRE /andP[INEQ1 INEQ2].
rewrite /blackout_during.
rewrite (eq_sum_seq _ _ _ _ (fun t ⇒ is_exceedance_exec (sched t))).
- specialize ( H_exceedance_in_busy_interval_bounded j t1 t2 ).
feed_n 3 H_exceedance_in_busy_interval_bounded ⇒ //=.
apply: leq_trans; last by apply H_exceedance_in_busy_interval_bounded.
rewrite (big_cat_nat _ INEQ2) //=.
by lia.
- move ⇒ t' /[!mem_index_iota]IN _.
rewrite blackout_implies_exceedance_execution.
by apply /eqP.
Qed.
Using the above, we can prove that our definition of SBF is valid.
Lemma eps_sbf_is_valid : valid_busy_sbf arr_seq sched tsk EPS_SBF_inst.
Proof.
rewrite /valid_busy_sbf /valid_pred_sbf /EPS_SBF_inst /eps_sbf //=.
split; first lia.
rewrite /pred_sbf_respected ⇒ j t1 t2 ARRIN [TSK BUSYPREFIX] t LEQ.
have Hsplit : t = t1 + (t - t1) by lia.
rewrite Hsplit.
have → : t1 + (t - t1) - t1 - e = (t - t1) - e by lia.
set (Δ := (t - t1)) in ×.
have ? : Δ - supply_during sched t1 (t1 + Δ) ≤ e; try lia.
rewrite -blackout_during_complement //=.
apply: blackout_during_bounded ⇒ //=.
by lia.
Qed.
Proof.
rewrite /valid_busy_sbf /valid_pred_sbf /EPS_SBF_inst /eps_sbf //=.
split; first lia.
rewrite /pred_sbf_respected ⇒ j t1 t2 ARRIN [TSK BUSYPREFIX] t LEQ.
have Hsplit : t = t1 + (t - t1) by lia.
rewrite Hsplit.
have → : t1 + (t - t1) - t1 - e = (t - t1) - e by lia.
set (Δ := (t - t1)) in ×.
have ? : Δ - supply_during sched t1 (t1 + Δ) ≤ e; try lia.
rewrite -blackout_during_complement //=.
apply: blackout_during_bounded ⇒ //=.
by lia.
Qed.
Finally, we prove that our SBF only takes steps of one unit.
Lemma eps_sbf_is_unit : unit_supply_bound_function EPS_SBF_inst.
Proof.
rewrite /unit_supply_bound_function ⇒ Δ.
rewrite /EPS_SBF_inst /eps_sbf //=.
by lia.
Qed.
End SBFFacts.
Proof.
rewrite /unit_supply_bound_function ⇒ Δ.
rewrite /EPS_SBF_inst /eps_sbf //=.
by lia.
Qed.
End SBFFacts.