Library prosa.analysis.facts.model.rbf
Require Export prosa.analysis.facts.model.workload.
Require Export prosa.analysis.definitions.job_properties.
Require Export prosa.analysis.definitions.request_bound_function.
Require Export prosa.analysis.definitions.job_properties.
Require Export prosa.analysis.definitions.request_bound_function.
Facts about Request Bound Functions (RBFs)
RBF is a Bound on Workload
Consider any type of tasks ...
... and any type of jobs associated with these tasks.
Context {Job : JobType}.
Context `{JobTask Job Task}.
Context `{JobArrival Job}.
Context `{JobCost Job}.
Context `{JobTask Job Task}.
Context `{JobArrival Job}.
Context `{JobCost Job}.
Consider any arrival sequence with consistent, non-duplicate arrivals...
Variable arr_seq : arrival_sequence Job.
Hypothesis H_arrival_times_are_consistent : consistent_arrival_times arr_seq.
Hypothesis H_arr_seq_is_a_set : arrival_sequence_uniq arr_seq.
Hypothesis H_arrival_times_are_consistent : consistent_arrival_times arr_seq.
Hypothesis H_arr_seq_is_a_set : arrival_sequence_uniq arr_seq.
... and any ideal uni-processor schedule of this arrival sequence.
Variable sched : schedule (ideal.processor_state Job).
Hypothesis H_jobs_come_from_arrival_sequence : jobs_come_from_arrival_sequence sched arr_seq.
Hypothesis H_jobs_come_from_arrival_sequence : jobs_come_from_arrival_sequence sched arr_seq.
Consider an FP policy that indicates a higher-or-equal priority relation.
Consider a task set ts...
...and let tsk be any task in ts.
Assume that the job costs are no larger than the task costs.
Next, we assume that all jobs come from the task set.
Let max_arrivals be any arrival bound for task-set ts.
Context `{MaxArrivals Task}.
Hypothesis H_is_arrival_bound : taskset_respects_max_arrivals arr_seq ts.
Hypothesis H_is_arrival_bound : taskset_respects_max_arrivals arr_seq ts.
Let's define some local names for clarity.
Let task_rbf := task_request_bound_function tsk.
Let total_rbf := total_request_bound_function ts.
Let total_hep_rbf := total_hep_request_bound_function_FP ts tsk.
Let total_ohep_rbf := total_ohep_request_bound_function_FP ts tsk.
Let total_rbf := total_request_bound_function ts.
Let total_hep_rbf := total_hep_request_bound_function_FP ts tsk.
Let total_ohep_rbf := total_ohep_request_bound_function_FP ts tsk.
Variable j : Job.
Hypothesis H_j_arrives : arrives_in arr_seq j.
Hypothesis H_job_of_tsk : job_task j = tsk.
Hypothesis H_j_arrives : arrives_in arr_seq j.
Hypothesis H_job_of_tsk : job_task j = tsk.
Next, we say that two jobs j1 and j2 are in relation
other_higher_eq_priority, iff j1 has higher or equal priority than j2 and
is produced by a different task.
Next, we recall the notions of total workload of jobs...
...notions of workload of higher or equal priority jobs...
Let total_hep_workload t1 t2 :=
workload_of_jobs (fun j_other ⇒ jlfp_higher_eq_priority j_other j) (arrivals_between arr_seq t1 t2).
workload_of_jobs (fun j_other ⇒ jlfp_higher_eq_priority j_other j) (arrivals_between arr_seq t1 t2).
... workload of other higher or equal priority jobs...
Let total_ohep_workload t1 t2 :=
workload_of_jobs (fun j_other ⇒ other_higher_eq_priority j_other j) (arrivals_between arr_seq t1 t2).
workload_of_jobs (fun j_other ⇒ other_higher_eq_priority j_other j) (arrivals_between arr_seq t1 t2).
... and the workload of jobs of the same task as job j.
In this section we prove that the workload of any jobs is
no larger than the request bound function.
Consider any time t and any interval of length delta.
First, we show that workload of task tsk is bounded by the number of
arrivals of the task times the cost of the task.
Lemma task_workload_le_num_of_arrivals_times_cost:
task_workload t (t + delta)
≤ task_cost tsk × number_of_task_arrivals arr_seq tsk t (t + delta).
task_workload t (t + delta)
≤ task_cost tsk × number_of_task_arrivals arr_seq tsk t (t + delta).
As a corollary, we prove that workload of task is no larger the than
task request bound function.
Next, we prove that total workload of other tasks with higher-or-equal
priority is no larger than the total request bound function.
Next, we prove that total workload of tasks with higher-or-equal
priority is no larger than the total request bound function.
Next, we prove that total workload of tasks is no larger than the total
request bound function.
Lemma total_workload_le_total_rbf'':
total_workload t (t + delta) ≤ total_rbf delta.
End WorkloadIsBoundedByRBF.
End ProofWorkloadBound.
total_workload t (t + delta) ≤ total_rbf delta.
End WorkloadIsBoundedByRBF.
End ProofWorkloadBound.
Consider any type of tasks ...
... and any type of jobs associated with these tasks.
Consider any arrival sequence.
Variable arr_seq : arrival_sequence Job.
Hypothesis H_arrival_times_are_consistent:
consistent_arrival_times arr_seq.
Hypothesis H_arrival_times_are_consistent:
consistent_arrival_times arr_seq.
Let tsk be any task.
Let max_arrivals be a family of valid arrival curves, i.e., for any task tsk in ts
max_arrival tsk is (1) an arrival bound of tsk, and (2) it is a monotonic function
that equals 0 for the empty interval delta = 0.
Context `{MaxArrivals Task}.
Hypothesis H_valid_arrival_curve : valid_arrival_curve tsk (max_arrivals tsk).
Hypothesis H_is_arrival_curve : respects_max_arrivals arr_seq tsk (max_arrivals tsk).
Hypothesis H_valid_arrival_curve : valid_arrival_curve tsk (max_arrivals tsk).
Hypothesis H_is_arrival_curve : respects_max_arrivals arr_seq tsk (max_arrivals tsk).
Let's define some local names for clarity.
We prove that task_rbf 0 is equal to 0.
We prove that task_rbf is monotone.
Variable j : Job.
Hypothesis H_j_arrives : arrives_in arr_seq j.
Hypothesis H_job_of_tsk : job_task j = tsk.
Hypothesis H_j_arrives : arrives_in arr_seq j.
Hypothesis H_job_of_tsk : job_task j = tsk.
Then we prove that task_rbf 1 is greater than or equal to task cost.