Skip to content
Snippets Groups Projects

Port instantiations

Merged Sergey Bozhko requested to merge sbozhko/rt-proofs:port-instantiations into master
4 files
+ 762
709
Compare changes
  • Side-by-side
  • Inline
Files
4
Require Import rt.util.all.
Require Import rt.model.arrival.basic.job
rt.model.arrival.basic.task_arrival
rt.model.priority.
Require Import rt.model.schedule.uni.service
rt.model.schedule.uni.workload
rt.model.schedule.uni.schedule
rt.model.schedule.uni.response_time
rt.model.schedule.uni.schedule_of_task.
Require Import rt.model.schedule.uni.limited.platform.definitions
rt.model.schedule.uni.limited.schedule
rt.model.schedule.uni.limited.rbf
rt.model.schedule.uni.limited.abstract_RTA.definitions
rt.model.schedule.uni.limited.abstract_RTA.reduction_of_search_space
rt.model.schedule.uni.limited.abstract_RTA.abstract_seq_rta
rt.model.schedule.uni.limited.jlfp_instantiation.
Require Import rt.model.arrival.curves.bounds.
Require Import rt.analysis.uni.arrival_curves.workload_bound.
Require Import rt.model.schedule.uni.limited.busy_interval.
From rt.util Require Import all.
From rt.restructuring.behavior Require Export time arrival_sequence schedule.
From rt.restructuring.model Require Export job task workload schedule.priority_based.priorities processor.ideal
schedule.priority_based.priorities schedule.work_conserving readiness.basic.
From rt.restructuring.analysis.basic_facts Require Import all.
From rt.restructuring.analysis.abstract Require Import busy_interval.
From rt.restructuring Require Import model.preemption.preemption_model.
From rt.restructuring Require Import model.schedule.priority_based.preemption_points.
From mathcomp Require Import ssreflect ssrbool eqtype ssrnat seq path fintype bigop.
(** * Abstract RTA for FP-schedulers *)
(** In this module we propose the abstract response-time analysis (RTA) for
FP uniprocessor scheduling of real-time tasks with arbitrary arrival models. *)
Module AbstractRTAforFPwithArrivalCurves.
Import Job ArrivalCurves TaskArrival Priority ScheduleOfTask
UniprocessorSchedule Workload Service ResponseTime MaxArrivalsWorkloadBound
LimitedPreemptionPlatform RBF BusyIntervalJLFP JLFPInstantiation.
Section AbstractResponseTimeAnalysisForFP.
Context {Task: eqType}.
Variable task_cost: Task -> time.
Context {Job: eqType}.
Variable job_arrival: Job -> time.
Variable job_cost: Job -> time.
Variable job_task: Job -> Task.
Section AbstractRTAforFPwithArrivalCurves.
(* Consider any type of tasks ... *)
Context {Task : TaskType}.
Context `{TaskCost Task}.
(* ... and any type of jobs associated with these tasks. *)
Context {Job : JobType}.
Context `{JobTask Job Task}.
Context `{JobArrival Job}.
Context `{JobCost Job}.
(* Consider any arrival sequence with consistent 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_is_a_set arr_seq. *)
(* Consider any arrival sequence with consistent, non-duplicate arrivals. *)
Variable arr_seq: arrival_sequence Job.
Hypothesis H_arrival_times_are_consistent: arrival_times_are_consistent job_arrival arr_seq.
Hypothesis H_arr_seq_is_a_set: arrival_sequence_is_a_set arr_seq.
(* Next, consider any uniprocessor schedule of this arrival sequence...*)
Variable sched: schedule Job.
Hypothesis H_jobs_come_from_arrival_sequence: jobs_come_from_arrival_sequence sched arr_seq.
(* ... where jobs do not execute before their arrival nor after completion. *)
Hypothesis H_jobs_must_arrive_to_execute: jobs_must_arrive_to_execute job_arrival sched.
Hypothesis H_completed_jobs_dont_execute: completed_jobs_dont_execute job_cost sched.
(* Next, assume that the schedule is a work-conserving schedule. *)
Hypothesis H_work_conserving: work_conserving job_arrival job_cost arr_seq sched.
(* Assume we have sequential jobs, i.e, jobs from the
(* Next, consider any ideal uniprocessor 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.
(* ... where jobs do not execute before their arrival or after completion. *)
Hypothesis H_jobs_must_arrive_to_execute : jobs_must_arrive_to_execute sched.
Hypothesis H_completed_jobs_dont_execute : completed_jobs_dont_execute sched.
(*
(* Next, assume that the schedule is a work-conserving schedule. *)
Hypothesis H_work_conserving: work_conserving job_arrival job_cost arr_seq sched.
(* Assume we have sequential jobs, i.e, jobs from the
same task execute in the order of their arrival. *)
Hypothesis H_sequential_jobs: sequential_jobs job_arrival job_cost sched job_task.
Hypothesis H_sequential_jobs: sequential_jobs job_arrival job_cost sched job_task.
(* Assume that a job cost cannot be larger than a task cost. *)
Hypothesis H_job_cost_le_task_cost:
cost_of_jobs_from_arrival_sequence_le_task_cost
task_cost job_cost job_task arr_seq.
(* Consider an arbitrary task set ts. *)
Variable ts: list Task.
(* Assume that a job cost cannot be larger than a task cost. *)
Hypothesis H_job_cost_le_task_cost:
cost_of_jobs_from_arrival_sequence_le_task_cost
task_cost job_cost job_task arr_seq.
(* Consider an arbitrary task set ts. *)
Variable ts: list Task.
(* Next, we assume that all jobs come from the task set. *)
Hypothesis H_all_jobs_from_taskset:
forall j, arrives_in arr_seq j -> job_task j \in ts.
(* Next, we assume that all jobs come from the task set. *)
Hypothesis H_all_jobs_from_taskset:
forall j, arrives_in arr_seq j -> job_task j \in ts.
(* Let max_arrivals be a family of proper arrival curves, i.e., for any task tsk in ts
(* Let max_arrivals be a family of proper 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. *)
Variable max_arrivals: Task -> time -> nat.
Hypothesis H_family_of_proper_arrival_curves:
family_of_proper_arrival_curves job_task arr_seq max_arrivals ts.
(* Let tsk be any task in ts that is to be analyzed. *)
Variable tsk: Task.
Hypothesis H_tsk_in_ts: tsk \in ts.
(* Consider proper job lock-in service and task lock-in functions, i.e... *)
Variable job_lock_in_service: Job -> time.
Variable task_lock_in_service: Task -> time.
Variable max_arrivals: Task -> time -> nat.
Hypothesis H_family_of_proper_arrival_curves:
family_of_proper_arrival_curves job_task arr_seq max_arrivals ts.
(* Let tsk be any task in ts that is to be analyzed. *)
Variable tsk: Task.
Hypothesis H_tsk_in_ts: tsk \in ts.
(* Consider proper job lock-in service and task lock-in functions, i.e... *)
Variable job_lock_in_service: Job -> time.
Variable task_lock_in_service: Task -> time.
(* ...we assume that for all jobs with positive cost in the arrival sequence the
(* ...we assume that for all jobs with positive cost in the arrival sequence the
lock-in service is (1) positive, (2) no bigger than costs of the corresponding
jobs, and (3) a job becomes nonpreemptive after it reaches its lock-in service... *)
Hypothesis H_proper_job_lock_in_service:
proper_job_lock_in_service job_cost arr_seq sched job_lock_in_service.
Hypothesis H_proper_job_lock_in_service:
proper_job_lock_in_service job_cost arr_seq sched job_lock_in_service.
(* ...and that [task_lock_in_service tsk] is (1) no bigger than tsk's cost, (2) for any
(* ...and that [task_lock_in_service tsk] is (1) no bigger than tsk's cost, (2) for any
job of task tsk job_lock_in_service is bounded by task_lock_in_service. *)
Hypothesis H_proper_task_lock_in_service:
proper_task_lock_in_service
task_cost job_task arr_seq job_lock_in_service task_lock_in_service tsk.
Hypothesis H_proper_task_lock_in_service:
proper_task_lock_in_service
task_cost job_task arr_seq job_lock_in_service task_lock_in_service tsk.
(* Consider an FP policy that indicates a higher-or-equal priority relation,
(* Consider an FP policy that indicates a higher-or-equal priority relation,
and assume that the relation is reflexive. Note that we do not relate
the FP policy with the scheduler. However, we define functions for
Interference and Interfering Workload that actively use the concept of
priorities. We require the FP policy to be reflexive, so a job cannot
cause lower-priority interference (i.e. priority inversion) to itself. *)
Variable higher_eq_priority: FP_policy Task.
Hypothesis H_priority_is_reflexive: FP_is_reflexive higher_eq_priority.
(* We also lift the FP priority relation to a corresponding JLFP priority relation. *)
Let jlfp_higher_eq_priority j1 j2 := FP_to_JLFP job_task higher_eq_priority j1 j2.
(* For clarity, let's define some local names. *)
Let job_pending_at := pending job_arrival job_cost sched.
Let job_scheduled_at := scheduled_at sched.
Let job_completed_by := completed_by job_cost sched.
Let job_backlogged_at := backlogged job_arrival job_cost sched.
Let arrivals_between := jobs_arrived_between arr_seq.
Let response_time_bounded_by := is_response_time_bound_of_task job_arrival job_cost job_task arr_seq sched.
Let quiet_time := quiet_time job_arrival job_cost arr_seq sched jlfp_higher_eq_priority.
Let busy_interval := busy_interval job_arrival job_cost arr_seq sched jlfp_higher_eq_priority.
Let task_scheduled_at := task_scheduled_at job_task sched.
Let cumulative_task_interference :=
AbstractSeqRTA.cumul_task_interference job_task arr_seq sched.
(* We introduce task_rbf as an abbreviation of the task request bound function,
Variable higher_eq_priority: FP_policy Task.
Hypothesis H_priority_is_reflexive: FP_is_reflexive higher_eq_priority.
(* We also lift the FP priority relation to a corresponding JLFP priority relation. *)
Let jlfp_higher_eq_priority j1 j2 := FP_to_JLFP job_task higher_eq_priority j1 j2.
(* For clarity, let's define some local names. *)
Let job_pending_at := pending job_arrival job_cost sched.
Let job_scheduled_at := scheduled_at sched.
Let job_completed_by := completed_by job_cost sched.
Let job_backlogged_at := backlogged job_arrival job_cost sched.
Let arrivals_between := jobs_arrived_between arr_seq.
Let response_time_bounded_by := is_response_time_bound_of_task job_arrival job_cost job_task arr_seq sched.
Let quiet_time := quiet_time job_arrival job_cost arr_seq sched jlfp_higher_eq_priority.
Let busy_interval := busy_interval job_arrival job_cost arr_seq sched jlfp_higher_eq_priority.
Let task_scheduled_at := task_scheduled_at job_task sched.
Let cumulative_task_interference :=
AbstractSeqRTA.cumul_task_interference job_task arr_seq sched.
(* We introduce task_rbf as an abbreviation of the task request bound function,
which is defined as [task_cost(tsk) × max_arrivals(tsk,Δ)]. *)
Let task_rbf := task_request_bound_function task_cost max_arrivals tsk.
Let task_rbf := task_request_bound_function task_cost max_arrivals tsk.
(* Using the sum of individual request bound functions, we define the request bound
(* Using the sum of individual request bound functions, we define the request bound
function of all tasks with higher-or-equal priority (with respect to tsk). *)
Let total_hep_rbf :=
total_hep_request_bound_function_FP task_cost higher_eq_priority max_arrivals ts tsk.
Let total_hep_rbf :=
total_hep_request_bound_function_FP task_cost higher_eq_priority max_arrivals ts tsk.
(* Similarly, we define the request bound function of all tasks other
(* Similarly, we define the request bound function of all tasks other
than tsk with higher-or-equal priority (with respect to tsk). *)
Let total_ohep_rbf :=
total_ohep_request_bound_function_FP task_cost higher_eq_priority max_arrivals ts tsk.
(* Assume that there eixsts a constant priority_inversion_bound that bounds
Let total_ohep_rbf :=
total_ohep_request_bound_function_FP task_cost higher_eq_priority max_arrivals ts tsk.
(* Assume that there eixsts a constant priority_inversion_bound that bounds
the length of any priority inversion experienced by any job of tsk.
Sinse we analyze only task tsk, we ignore the lengths of priority
inversions incurred by any other tasks. *)
Variable priority_inversion_bound: time.
Hypothesis H_priority_inversion_is_bounded:
priority_inversion_is_bounded_by
job_arrival job_cost job_task arr_seq sched jlfp_higher_eq_priority tsk priority_inversion_bound.
Variable priority_inversion_bound: time.
Hypothesis H_priority_inversion_is_bounded:
priority_inversion_is_bounded_by
job_arrival job_cost job_task arr_seq sched jlfp_higher_eq_priority tsk priority_inversion_bound.
(* Let L be any positive fixed point of the busy interval recurrence. *)
Variable L: time.
@@ -432,5 +420,5 @@ Module AbstractRTAforFPwithArrivalCurves.
Qed.
End AbstractResponseTimeAnalysisForFP.
*)
End AbstractRTAforFPwithArrivalCurves.
\ No newline at end of file
Loading