Commit 724884f9 authored by Felipe Cerqueira's avatar Felipe Cerqueira
Browse files

Prove workload bound with jitter

parent 60232a68
......@@ -9,10 +9,12 @@ Module ResponseTimeAnalysis.
Section Interference.
(* Assume any job arrival sequence...*)
Context {sporadic_task: eqType}.
Context {Job: eqType}.
Variable job_cost: Job -> nat.
Variable job_task: Job -> sporadic_task.
(* Assume any job arrival sequence...*)
Context {arr_seq: arrival_sequence Job}.
(* ... and any platform. *)
......@@ -169,10 +171,15 @@ Module ResponseTimeAnalysis.
Section InterferenceBound.
Context {sporadic_task: eqType}.
Variable task_cost: sporadic_task -> nat.
Variable task_period: sporadic_task -> nat.
Variable task_deadline: sporadic_task -> nat.
(* Let tsk be the task to be analyzed. *)
Variable tsk: sporadic_task.
Definition task_with_response_time := (sporadic_task * time)%type.
Let task_with_response_time := (sporadic_task * time)%type.
(* Assume a known response-time bound for each interfering task ... *)
Variable R_prev: seq task_with_response_time.
......@@ -189,14 +196,14 @@ Module ResponseTimeAnalysis.
(* Based on the workload bound, Bertogna and Cirinei define the
following interference bound for a task. *)
Definition interference_bound :=
minn (W tsk_other R_other delta) (delta - (task_cost tsk) + 1).
minn (W task_cost task_period tsk_other R_other delta) (delta - (task_cost tsk) + 1).
End PerTask.
Section FP.
(* Assume an FP policy. *)
Variable higher_eq_priority: fp_policy.
Variable higher_eq_priority: fp_policy sporadic_task.
Definition is_interfering_task_fp (tsk_other: sporadic_task) :=
higher_eq_priority tsk_other tsk && (tsk_other != tsk).
......@@ -224,18 +231,25 @@ Module ResponseTimeAnalysis.
Section ResponseTimeBound.
(* Assume any job arrival sequence... *)
Context {sporadic_task: eqType}.
Variable task_cost: sporadic_task -> nat.
Variable task_period: sporadic_task -> nat.
Variable task_deadline: sporadic_task -> nat.
Context {Job: eqType}.
Variable job_cost: Job -> nat.
Variable job_deadline: Job -> nat.
Variable job_task: Job -> sporadic_task.
(* Assume any job arrival sequence... *)
Context {arr_seq: arrival_sequence Job}.
(* ... in which jobs arrive sporadically and have valid parameters. *)
Hypothesis H_sporadic_tasks: sporadic_task_model arr_seq job_task.
Hypothesis H_sporadic_tasks:
sporadic_task_model task_period arr_seq job_task.
Hypothesis H_valid_job_parameters:
forall (j: JobIn arr_seq),
(valid_sporadic_job job_cost job_deadline job_task) j.
valid_sporadic_job task_cost task_deadline job_cost job_deadline job_task j.
(* Consider any schedule such that...*)
Variable num_cpus: nat.
......@@ -260,8 +274,9 @@ Module ResponseTimeAnalysis.
(* Assume that we have a task set where all tasks have valid
parameters and restricted deadlines. *)
Variable ts: sporadic_taskset.
Hypothesis H_valid_task_parameters: valid_sporadic_taskset ts.
Variable ts: taskset_of sporadic_task.
Hypothesis H_valid_task_parameters:
valid_sporadic_taskset task_cost task_period task_deadline ts.
Hypothesis H_restricted_deadlines:
forall tsk, tsk \in ts -> task_deadline tsk <= task_period tsk.
......@@ -275,6 +290,7 @@ Module ResponseTimeAnalysis.
is_response_time_bound_of_task job_cost job_task tsk rate sched.
(* Assume a known response-time bound for any interfering task *)
Let task_with_response_time := (sporadic_task * time)%type.
Variable hp_bounds: seq task_with_response_time.
(* We derive the response-time bounds for FP and EDF scheduling
......@@ -282,7 +298,7 @@ Module ResponseTimeAnalysis.
Section UnderFPScheduling.
(* For FP scheduling, assume there exists a fixed task priority. *)
Variable higher_eq_priority: fp_policy.
Variable higher_eq_priority: fp_policy sporadic_task.
Let interferes_with_tsk := is_interfering_task_fp tsk higher_eq_priority.
......@@ -343,7 +359,7 @@ Module ResponseTimeAnalysis.
Hypothesis H_response_time_recurrence_holds :
R = task_cost tsk +
div_floor
(total_interference_bound_fp tsk hp_bounds R higher_eq_priority)
(total_interference_bound_fp task_cost task_period tsk hp_bounds R higher_eq_priority)
num_cpus.
(*..., and R is no larger than the deadline of tsk, ...*)
......@@ -384,7 +400,7 @@ Module ResponseTimeAnalysis.
set workload_bound := fun (tup: task_with_response_time) =>
let (tsk_k, R_k) := tup in
if interferes_with_tsk tsk_k then
W tsk_k R_k R
W task_cost task_period tsk_k R_k R
else 0.
(* Now we start the proof. Assume by contradiction that job j
......@@ -429,8 +445,7 @@ Module ResponseTimeAnalysis.
by destruct (sched cpu t);[by rewrite HAScpu mul1n RATE|by ins].
}
{
apply workload_bounded_by_W with
(job_cost := job_cost) (job_deadline := job_deadline); ins;
apply workload_bounded_by_W with (task_deadline0 := task_deadline) (job_cost0 := job_cost) (job_deadline0 := job_deadline); ins;
[ by rewrite RATE
| by apply TASK_PARAMS
| by apply RESTR
......@@ -504,10 +519,10 @@ Module ResponseTimeAnalysis.
task_is_scheduled job_task sched i t then 1 else 0))); last first.
{
ins; destruct ((i \in ts) && interferes_with_tsk i) eqn:IN;
rewrite IN; [by rewrite andTb | by rewrite andFb].
[by rewrite andTb | by rewrite andFb].
}
rewrite (eq_bigr (fun i => if (i \in ts) && true then (if interferes_with_tsk i && task_is_scheduled job_task sched i t then 1 else 0) else 0));
last by ins; destruct (i \in ts) eqn:IN; rewrite IN ?andTb ?andFb.
last by ins; destruct (i \in ts) eqn:IN; rewrite ?andTb ?andFb.
by rewrite -big_mkcond -big_seq_cond -big_mkcond sum1_count; apply (INVARIANT j).
}
......@@ -576,7 +591,7 @@ Module ResponseTimeAnalysis.
apply leq_trans with (n := x tsk_a); first by apply LEa.
unfold x, task_interference, some_interference_A.
destruct ((tsk_a \in ts) && interferes_with_tsk tsk_a) eqn:INTERFa;
rewrite INTERFa; last by ins.
last by ins.
move: INTERFa => /andP INTERFa; des.
apply leq_sum; ins.
destruct (backlogged job_cost rate sched j i);
......@@ -664,7 +679,7 @@ Module ResponseTimeAnalysis.
task_is_scheduled job_task sched i t));
last first.
{
ins; destruct ((i \in ts) && interferes_with_tsk i) eqn:INTERi; rewrite INTERi;
ins; destruct ((i \in ts) && interferes_with_tsk i) eqn:INTERi;
first by move: INTERi => /andP [_ INTERi]; apply eq_bigr; ins; rewrite INTERi andTb.
by rewrite (eq_bigr (fun i => 0));
[by rewrite big_const_nat iter_addn mul0n addn0 | by ins].
......@@ -693,7 +708,7 @@ Module ResponseTimeAnalysis.
all tasks (artifact of the proof by contradiction). *)
assert (SUM: \sum_((tsk_k, R_k) <- hp_bounds)
minn (x tsk_k) (R - task_cost tsk + 1) >
total_interference_bound_fp tsk hp_bounds
total_interference_bound_fp task_cost task_period tsk hp_bounds
R higher_eq_priority).
{
apply leq_trans with (n := \sum_(tsk_k <- ts) minn (x tsk_k) (R - task_cost tsk + 1));
......@@ -743,8 +758,8 @@ Module ResponseTimeAnalysis.
unfold interference_bound, workload_bound, x in *.
fold (interferes_with_tsk); destruct (interferes_with_tsk tsk_k) eqn:INTERFk;
[rewrite andbT in ALL; rewrite andbT | by rewrite andbF min0n].
destruct (tsk_k \in ts) eqn:INk; rewrite INk; last by rewrite min0n.
by rewrite INk andTb -leqNgt in ALL.
destruct (tsk_k \in ts) eqn:INk; last by rewrite min0n.
by rewrite andTb -leqNgt in ALL.
}
(* For this particular task, we show that x_k > W_k.
......@@ -753,7 +768,7 @@ Module ResponseTimeAnalysis.
destruct tup_k as [tsk_k R_k]; simpl in LTmin.
move: LTmin => /andP [INTERFk LTmin]; move: (INTERFk) => /andP [INk INTERFk'].
rewrite INTERFk' in LTmin; unfold minn at 1 in LTmin.
destruct (W tsk_k R_k R < R - task_cost tsk + 1); rewrite leq_min in LTmin;
destruct (W task_cost task_period tsk_k R_k R < R - task_cost tsk + 1); rewrite leq_min in LTmin;
last by move: LTmin => /andP [_ BUG]; rewrite ltnn in BUG.
move: LTmin => /andP [BUG _]; des.
specialize (WORKLOAD tsk_k INTERFk R_k HPk).
......
......@@ -4,14 +4,23 @@ Require Import Vbase ScheduleDefs BertognaResponseTimeDefs divround helper
Module ResponseTimeIterationFP.
Import Schedule ResponseTimeAnalysis.
Section Analysis.
Context {sporadic_task: eqType}.
Variable task_cost: sporadic_task -> nat.
Variable task_period: sporadic_task -> nat.
Variable task_deadline: sporadic_task -> nat.
Let task_with_response_time := (sporadic_task * nat)%type.
Context {Job: eqType}.
Variable job_cost: Job -> nat.
Variable job_deadline: Job -> nat.
Variable job_task: Job -> sporadic_task.
Variable num_cpus: nat.
Variable higher_eq_priority: fp_policy.
Variable higher_eq_priority: fp_policy sporadic_task.
Hypothesis H_valid_policy: valid_fp_policy higher_eq_priority.
(* Next we define the fixed-point iteration for computing
......@@ -30,8 +39,8 @@ Module ResponseTimeIterationFP.
iter step
(fun t => task_cost tsk +
div_floor
(total_interference_bound_fp
tsk R_prev t higher_eq_priority)
(total_interference_bound_fp task_cost task_period tsk
R_prev t higher_eq_priority)
num_cpus)
(task_cost tsk).
......@@ -59,12 +68,12 @@ Module ResponseTimeIterationFP.
(* To return the complete list of response-time bounds for any task set,
we just apply foldl (reduce) using the function above. *)
Definition R_list (ts: sporadic_taskset) : option (seq task_with_response_time) :=
Definition R_list (ts: taskset_of sporadic_task) : option (seq task_with_response_time) :=
foldl R_list_helper (Some [::]) ts.
(* The schedulability test simply checks if we got a list of
response-time bounds (i.e., if the computation did not fail). *)
Definition fp_schedulable (ts: sporadic_taskset) :=
Definition fp_schedulable (ts: taskset_of sporadic_task) :=
R_list ts != None.
Section AuxiliaryLemmas.
......@@ -268,19 +277,18 @@ Module ResponseTimeIterationFP.
}
Qed.
(* To prove convergence of R, we first show convergence of rt_rec. *)
Lemma per_task_rta_converges:
(* To prove convergence of R, we first show convergence of rt_rec. *) Lemma per_task_rta_converges:
forall ts' tsk rt_bounds,
valid_sporadic_taskset ts' ->
valid_sporadic_taskset task_cost task_period task_deadline ts' ->
R_list ts' = Some rt_bounds ->
per_task_rta tsk rt_bounds (max_steps tsk) <= task_deadline tsk ->
per_task_rta tsk rt_bounds (max_steps tsk) =
per_task_rta tsk rt_bounds (max_steps tsk).+1.
Proof.
unfold valid_sporadic_taskset, valid_sporadic_task in *.
unfold valid_sporadic_taskset, is_valid_sporadic_task in *.
(* To simplify, let's call the function f.*)
intros ts tsk rt_bounds VALID SOME LE;
intros ts' tsk rt_bounds VALID SOME LE;
set (f := per_task_rta tsk rt_bounds); fold f in LE.
(* First prove that f is monotonic.*)
......@@ -298,13 +306,13 @@ Module ResponseTimeIterationFP.
intros i; destruct (i \in rt_bounds) eqn:HP;
last by rewrite andFb.
destruct i as [i R]; intros _.
have GE_COST := (R_list_ge_cost ts rt_bounds i R).
have INts := (R_list_non_empty ts rt_bounds i SOME).
have GE_COST := (R_list_ge_cost ts' rt_bounds i R).
have INts := (R_list_non_empty ts' rt_bounds i SOME).
destruct INts as [_ EX]; exploit EX; [by exists R | intro IN].
unfold interference_bound; simpl.
rewrite leq_min; apply/andP; split.
{
apply leq_trans with (n := W i R x1);
apply leq_trans with (n := W task_cost task_period i R x1);
first by apply geq_minl.
specialize (VALID i IN); des.
by apply W_monotonic; try (by ins); apply GE_COST.
......@@ -349,11 +357,11 @@ Module ResponseTimeIterationFP.
by apply leq_ltn_trans with (m := f (task_deadline tsk).+1) in BY1;
[by rewrite ltnn in BY1 | by ins].
Qed.
Lemma per_task_rta_fold :
forall tsk rt_bounds,
task_cost tsk +
div_floor (total_interference_bound_fp tsk rt_bounds
div_floor (total_interference_bound_fp task_cost task_period tsk rt_bounds
(per_task_rta tsk rt_bounds (max_steps tsk)) higher_eq_priority) num_cpus
= per_task_rta tsk rt_bounds (max_steps tsk).+1.
Proof.
......@@ -452,7 +460,7 @@ Module ResponseTimeIterationFP.
Section Proof.
(* Consider a task set ts. *)
Variable ts: sporadic_taskset.
Variable ts: taskset_of sporadic_task.
(* Assume that higher_eq_priority is a total order.
Actually, it just needs to be total over the task set,
......@@ -467,7 +475,8 @@ Module ResponseTimeIterationFP.
Hypothesis H_ts_is_a_set: uniq ts.
(* ...all tasks have valid parameters, ... *)
Hypothesis H_valid_task_parameters: valid_sporadic_taskset ts.
Hypothesis H_valid_task_parameters:
valid_sporadic_taskset task_cost task_period task_deadline ts.
(* ...restricted deadlines, ...*)
Hypothesis H_restricted_deadlines:
......@@ -486,10 +495,11 @@ Module ResponseTimeIterationFP.
(* ...they have valid parameters,...*)
Hypothesis H_valid_job_parameters:
forall (j: JobIn arr_seq),
valid_sporadic_job job_cost job_deadline job_task j.
valid_sporadic_job task_cost task_deadline job_cost job_deadline job_task j.
(* ... and satisfy the sporadic task model.*)
Hypothesis H_sporadic_tasks: sporadic_task_model arr_seq job_task.
Hypothesis H_sporadic_tasks:
sporadic_task_model task_period arr_seq job_task.
(* Then, consider any platform with at least one CPU and unit
unit execution rate, where...*)
......@@ -554,7 +564,7 @@ Module ResponseTimeIterationFP.
clear ALLJOBS.
unfold fp_schedulable, R_list in *.
induction ts as [| ts' tsk_i] using last_ind.
induction ts as [| ts' tsk_i IH] using last_ind.
{
intros rt_bounds tsk R SOME IN.
by inversion SOME; subst; rewrite in_nil in IN.
......@@ -566,7 +576,7 @@ Module ResponseTimeIterationFP.
rewrite mem_rcons in_cons in IN; move: IN => /orP IN.
destruct IN as [LAST | BEGINNING]; last first.
{
apply IHs with (rt_bounds := hp_bounds) (tsk := tsk); try (by ins).
apply IH with (rt_bounds := hp_bounds) (tsk := tsk); try (by ins).
by rewrite rcons_uniq in SET; move: SET => /andP [_ SET].
by ins; red; ins; apply TASKPARAMS; rewrite mem_rcons in_cons; apply/orP; right.
by ins; apply RESTR; rewrite mem_rcons in_cons; apply/orP; right.
......@@ -597,13 +607,13 @@ Module ResponseTimeIterationFP.
generalize SOME; apply R_list_rcons_prefix in SOME; intro SOME'.
have BOUND := bertogna_cirinei_response_time_bound_fp.
unfold is_response_time_bound_of_task, job_has_completed_by in BOUND.
apply BOUND with (job_deadline := job_deadline) (job_task := job_task) (tsk := tsk_lst)
apply BOUND with (task_cost := task_cost) (task_period := task_period) (task_deadline := task_deadline) (job_deadline := job_deadline) (job_task := job_task) (tsk := tsk_lst)
(ts := rcons ts' tsk_lst) (hp_bounds := hp_bounds)
(higher_eq_priority := higher_eq_priority); clear BOUND; try (by ins).
by apply R_list_unzip1 with (R := R_lst).
{
intros hp_tsk R0 HP j0 JOB0.
apply IHs with (rt_bounds := hp_bounds) (tsk := hp_tsk); try (by ins).
apply IH with (rt_bounds := hp_bounds) (tsk := hp_tsk); try (by ins).
by rewrite rcons_uniq in SET; move: SET => /andP [_ SET].
by red; ins; apply TASKPARAMS; rewrite mem_rcons in_cons; apply/orP; right.
by ins; apply RESTR; rewrite mem_rcons in_cons; apply/orP; right.
......@@ -688,7 +698,7 @@ Module ResponseTimeIterationFP.
rewrite eqn_leq; apply/andP; split; first by apply service_interval_le_cost.
apply leq_trans with (n := service rate sched j (job_arrival j + R)); last first.
{
unfold valid_sporadic_taskset, valid_sporadic_task in *.
unfold valid_sporadic_taskset, is_valid_sporadic_task in *.
apply service_monotonic; rewrite leq_add2l.
specialize (JOBPARAMS j); des; rewrite JOBPARAMS1.
by rewrite JOBtsk.
......@@ -736,4 +746,6 @@ Module ResponseTimeIterationFP.
End Proof.
End ResponseTimeIterationFP.
\ No newline at end of file
End Analysis.
End ResponseTimeIterationFP.
\ No newline at end of file
......@@ -8,9 +8,7 @@ Module Priority.
Section PriorityDefs.
Context {sporadic_task: eqType}.
Context {Job: eqType}.
Variable num_cpus: nat.
Variable arr_seq: arrival_sequence Job.
(* All the priority relations are non-strict, i.e., they specify that
......@@ -25,6 +23,7 @@ Module Priority.
(* FP policy is simply a relation between tasks.
Because our model of processor platform is based on a generic JLDP policy,
we generate a JLDP policy from an FP policy whenever required. *)
Variable sporadic_task: eqType.
Definition fp_policy := sporadic_task -> sporadic_task -> bool.
Section ValidJLFPPolicy.
......@@ -41,9 +40,7 @@ Module Priority.
(* A policy is total, since it must know the priority of any two jobs at any time. *)
Definition jlfp_is_total :=
forall (sched: schedule num_cpus arr_seq)
(j1 j2: JobIn arr_seq) t,
is_higher_priority sched t j1 j2 \/ is_higher_priority sched t j2 j1.
forall t, total (is_higher_priority t).
(* A JLDP policy is valid iff it satisfies the three properties.
Note that, for generality, we don't enforce antisymmetry and allow multiple
......@@ -61,9 +58,7 @@ Module Priority.
Definition fp_is_transitive := transitive is_higher_priority.
Definition fp_is_total :=
forall tsk1 tsk2,
is_higher_priority tsk1 tsk2 \/ is_higher_priority tsk2 tsk1.
Definition fp_is_total := total is_higher_priority.
(* We enforce the same restrictions for FP policy: reflexive, transitive, total. *)
Definition valid_fp_policy :=
......@@ -75,6 +70,10 @@ Module Priority.
Section RateDeadlineMonotonic.
Context {sporadic_task: eqType}.
Variable task_period: sporadic_task -> nat.
Variable task_deadline: sporadic_task -> nat.
(* Rate-Monotonic and Deadline-Monotonic priority order *)
Definition RM (tsk1 tsk2: sporadic_task) := task_period tsk1 <= task_period tsk2.
......@@ -85,7 +84,7 @@ Module Priority.
unfold valid_fp_policy, fp_is_reflexive, fp_is_transitive, RM;
repeat (split; try red); first by ins.
by intros x y z XY YZ; apply leq_trans with (n := task_period x).
by intros tsk1 tsk2; destruct (leqP (task_period tsk1) (task_period tsk2));
by red; intros tsk1 tsk2; apply/orP; destruct (leqP (task_period tsk1) (task_period tsk2));
[by left | by right; apply ltnW].
Qed.
......@@ -94,7 +93,7 @@ Module Priority.
unfold valid_fp_policy, fp_is_reflexive, fp_is_transitive, DM;
repeat (split; try red); first by ins.
by intros x y z; apply leq_trans.
by intros tsk1 tsk2; destruct (leqP (task_deadline tsk1) (task_deadline tsk2));
by red; intros tsk1 tsk2; apply/orP; destruct (leqP (task_deadline tsk1) (task_deadline tsk2));
[by left | by right; apply ltnW].
Qed.
......@@ -102,13 +101,14 @@ Module Priority.
Section GeneralizeFP.
Context {sporadic_task: eqType}.
Context {Job: eqType}.
Variable job_task: Job -> sporadic_task.
Variable arr_seq: arrival_sequence Job.
Variable num_cpus: nat.
Definition fp_to_jldp (task_hp: fp_policy) : jldp_policy num_cpus arr_seq :=
fun (sched: schedule num_cpus arr_seq) (t: time) (jhigh jlow: JobIn arr_seq) =>
Definition fp_to_jldp (task_hp: fp_policy sporadic_task) : jldp_policy arr_seq :=
fun (t: time) (jhigh jlow: JobIn arr_seq) =>
task_hp (job_task jhigh) (job_task jlow).
Lemma valid_fp_is_valid_jldp :
......@@ -127,16 +127,17 @@ Module Priority.
Section JLFPDefs.
Context {sporadic_task: eqType}.
Context {Job: eqType}.
Context {num_cpus: nat}.
Context {arr_seq: arrival_sequence Job}.
Variable is_higher_priority: jldp_policy num_cpus arr_seq.
Variable is_higher_priority: jldp_policy arr_seq.
(* JLFP policy is a JLDP policy where the priorities do not vary with time. *)
Definition is_jlfp_policy (is_higher_priority: jldp_policy num_cpus arr_seq) :=
forall sched j1 j2 t t',
is_higher_priority sched t j1 j2 -> is_higher_priority sched t' j1 j2.
Definition is_jlfp_policy (is_higher_priority: jldp_policy arr_seq) :=
forall j1 j2 t t',
is_higher_priority t j1 j2 -> is_higher_priority t' j1 j2.
(* Lemma: every FP policy is a JLFP policy. *)
Variable job_task: Job -> sporadic_task.
......@@ -156,7 +157,7 @@ Module Priority.
Context {arr_seq: arrival_sequence Job}.
Variable job_deadline: Job -> nat.
Definition EDF (sched: schedule num_cpus arr_seq) (t: time) (j1 j2: JobIn arr_seq) :=
Definition EDF (t: time) (j1 j2: JobIn arr_seq) :=
job_arrival j1 + job_deadline j1 <= job_arrival j2 + job_deadline j2.
(* Lemma: EDF is a JLFP policy. *)
......@@ -171,14 +172,14 @@ Module Priority.
repeat (split; try red).
by ins; apply leqnn.
by intros sched t y x z; apply leq_trans.
by intros sched j1 j2 t;
by intros _; red; intros j1 j2; apply/orP;
destruct (leqP (job_arrival j1 + job_deadline j1) (job_arrival j2 + job_deadline j2));
[by left | by right; apply ltnW].
Qed.
End EDFDefs.
Section ScheduleIndependent.
(*Section ScheduleIndependent.
Context {Job: eqType}.
Context {num_cpus: nat}.
......@@ -203,7 +204,7 @@ Module Priority.
by unfold schedule_independent, fp_to_jldp.
Qed.
End ScheduleIndependent.
End ScheduleIndependent.*)
End Priority.
......@@ -229,7 +230,4 @@ Definition interferes_with (jlow jhigh: job) :=
Definition num_interfering_jobs (jlow: job) :=
count (interferes_with jlow) (all_arrivals sched t).
End BasicDefinitions.*)
\ No newline at end of file
End BasicDefinitions.*)
\ No newline at end of file
......@@ -7,7 +7,8 @@ Module ResponseTime.
Import Schedule SporadicTaskset SporadicTaskArrival.
Section ResponseTimeBound.
Context {sporadic_task: eqType}.
Context {Job: eqType}.
Context {arr_seq: arrival_sequence Job}.
Variable job_cost: Job -> nat.
......@@ -38,6 +39,7 @@ Module ResponseTime.
Section BasicLemmas.
Context {sporadic_task: eqType}.
Context {Job: eqType}.
Variable job_cost: Job -> nat.
Variable job_task: Job -> sporadic_task.
......@@ -130,6 +132,9 @@ Module ResponseTime.
Section LowerBoundOfResponseTimeBound.
Context {sporadic_task: eqType}.
Variable task_cost: sporadic_task -> nat.
Context {Job: eqType}.
Variable job_cost: Job -> nat.
Variable job_task: Job -> sporadic_task.
......@@ -164,7 +169,7 @@ Module ResponseTime.
Lemma response_time_ub_ge_task_cost:
R >= task_cost tsk.
Proof.
unfold valid_sporadic_task, job_has_completed_by, completed in *.
unfold job_has_completed_by, completed in *.
rename job_of_tsk_exists into EX; des.
set new_cost := fun (j': Job) => task_cost (job_task j').
apply leq_trans with (n := new_cost j);
......
......@@ -12,7 +12,7 @@ Module Schedulability.
Variable job_cost: Job -> nat.
Variable job_deadline: Job -> nat.
Section SingleSchedule.
Section ScheduleOfJobs.
Context {num_cpus: nat}.
Variable rate: Job -> processor num_cpus -> nat.
......@@ -23,17 +23,18 @@ Module Schedulability.
Definition job_misses_no_deadline :=
completed job_cost rate sched j (job_arrival j + job_deadline j).
End SingleSchedule.
End ScheduleOfJobs.
Section SingleScheduleTasks.
Section ScheduleOfTasks.
Context {sporadic_task: eqType}.
Variable job_task: Job -> sporadic_task.
Context {num_cpus: nat}.
Variable rate: Job -> processor num_cpus -> nat.
Variable sched: schedule num_cpus arr_seq.
Variable ts: sporadic_taskset.
Variable ts: taskset_of sporadic_task.