Library prosa.classic.analysis.uni.susp.dynamic.jitter.jitter_schedule_properties
Require Import prosa.classic.util.all.
Require Import prosa.classic.model.priority prosa.classic.model.suspension.
Require Import prosa.classic.model.arrival.basic.job prosa.classic.model.arrival.basic.task
prosa.classic.model.arrival.basic.arrival_sequence.
Require Import prosa.classic.model.arrival.jitter.job.
Require Import prosa.classic.model.schedule.uni.schedulability prosa.classic.model.schedule.uni.service
prosa.classic.model.schedule.uni.workload
prosa.classic.model.schedule.uni.response_time.
Require Import prosa.classic.model.schedule.uni.jitter.schedule
prosa.classic.model.schedule.uni.jitter.valid_schedule
prosa.classic.model.schedule.uni.jitter.platform.
Require Import prosa.classic.model.schedule.uni.susp.suspension_intervals
prosa.classic.model.schedule.uni.susp.schedule
prosa.classic.model.schedule.uni.susp.valid_schedule
prosa.classic.model.schedule.uni.susp.platform.
Require Import prosa.classic.analysis.uni.susp.dynamic.jitter.jitter_schedule.
Require Import prosa.classic.model.schedule.uni.transformation.construction.
From mathcomp Require Import ssreflect ssrbool eqtype ssrnat seq fintype bigop path.
Module JitterScheduleProperties.
Import Job SporadicTaskset Suspension Priority SuspensionIntervals Workload Service
UniprocessorScheduleWithJitter Schedulability ResponseTime
ScheduleConstruction ValidSuspensionAwareSchedule ValidJitterAwareSchedule.
Module basic := schedule.UniprocessorSchedule.
Module susp := ScheduleWithSuspensions.
Module jitter_aware := Platform.
Module susp_aware := PlatformWithSuspensions.
Module job_jitter := JobWithJitter.
Module reduction := JitterScheduleConstruction.
Section ProvingScheduleProperties.
Context {Task: eqType}.
Context {Job: eqType}.
Variable job_arrival: Job → time.
Variable job_task: Job → Task.
Require Import prosa.classic.model.priority prosa.classic.model.suspension.
Require Import prosa.classic.model.arrival.basic.job prosa.classic.model.arrival.basic.task
prosa.classic.model.arrival.basic.arrival_sequence.
Require Import prosa.classic.model.arrival.jitter.job.
Require Import prosa.classic.model.schedule.uni.schedulability prosa.classic.model.schedule.uni.service
prosa.classic.model.schedule.uni.workload
prosa.classic.model.schedule.uni.response_time.
Require Import prosa.classic.model.schedule.uni.jitter.schedule
prosa.classic.model.schedule.uni.jitter.valid_schedule
prosa.classic.model.schedule.uni.jitter.platform.
Require Import prosa.classic.model.schedule.uni.susp.suspension_intervals
prosa.classic.model.schedule.uni.susp.schedule
prosa.classic.model.schedule.uni.susp.valid_schedule
prosa.classic.model.schedule.uni.susp.platform.
Require Import prosa.classic.analysis.uni.susp.dynamic.jitter.jitter_schedule.
Require Import prosa.classic.model.schedule.uni.transformation.construction.
From mathcomp Require Import ssreflect ssrbool eqtype ssrnat seq fintype bigop path.
Module JitterScheduleProperties.
Import Job SporadicTaskset Suspension Priority SuspensionIntervals Workload Service
UniprocessorScheduleWithJitter Schedulability ResponseTime
ScheduleConstruction ValidSuspensionAwareSchedule ValidJitterAwareSchedule.
Module basic := schedule.UniprocessorSchedule.
Module susp := ScheduleWithSuspensions.
Module jitter_aware := Platform.
Module susp_aware := PlatformWithSuspensions.
Module job_jitter := JobWithJitter.
Module reduction := JitterScheduleConstruction.
Section ProvingScheduleProperties.
Context {Task: eqType}.
Context {Job: eqType}.
Variable job_arrival: Job → time.
Variable job_task: Job → Task.
Basic Setup & Setting
Variable ts: seq Task.
Variable arr_seq: arrival_sequence Job.
Hypothesis H_arrival_times_are_consistent:
arrival_times_are_consistent job_arrival arr_seq.
Hypothesis H_jobs_from_taskset:
∀ j, arrives_in arr_seq j → job_task j \in ts.
Variable higher_eq_priority: FP_policy Task.
Hypothesis H_priority_is_reflexive: FP_is_reflexive higher_eq_priority.
Hypothesis H_priority_is_transitive: FP_is_transitive higher_eq_priority.
Hypothesis H_priority_is_total: FP_is_total_over_task_set higher_eq_priority ts.
Let job_higher_eq_priority := FP_to_JLDP job_task higher_eq_priority.
Variable job_cost: Job → time.
Variable task_cost: Task → time.
Variable job_suspension_duration: job_suspension Job.
Variable sched_susp: schedule Job.
Hypothesis H_valid_schedule:
valid_suspension_aware_schedule job_arrival arr_seq job_higher_eq_priority
job_suspension_duration job_cost sched_susp.
Let job_response_time_in_sched_susp_bounded_by :=
is_response_time_bound_of_job job_arrival job_cost sched_susp.
Analysis Setup
Variable j: Job.
Hypothesis H_from_arrival_sequence: arrives_in arr_seq j.
Let arr_j := job_arrival j.
Let task_of_j := job_task j.
Let other_hep_task tsk_other :=
higher_eq_priority tsk_other task_of_j && (tsk_other != task_of_j).
Variable R: Job → time.
Instantiation of the Reduction
Let sched_jitter := reduction.sched_jitter job_arrival job_task arr_seq higher_eq_priority
job_cost job_suspension_duration j R.
Let inflated_job_cost := reduction.inflated_job_cost job_cost job_suspension_duration j.
Let job_jitter := reduction.job_jitter job_arrival job_task higher_eq_priority job_cost j R.
Schedule Construction
Section PropertiesOfScheduleConstruction.
Let build_schedule := reduction.build_schedule job_arrival job_task arr_seq higher_eq_priority
job_cost job_suspension_duration j R.
Lemma sched_jitter_depends_only_on_service:
∀ sched1 sched2 t,
(∀ j, service sched1 j t = service sched2 j t) →
build_schedule sched1 t = build_schedule sched2 t.
Corollary sched_jitter_uses_construction_function:
∀ t,
sched_jitter t = build_schedule sched_jitter t.
End PropertiesOfScheduleConstruction.
Valid Schedule Properties
Section ScheduleIsValid.
Let pending_jobs_other_than_j :=
reduction.pending_jobs_other_than_j job_arrival job_task arr_seq higher_eq_priority
job_cost job_suspension_duration j R sched_jitter.
Let hp_job_other_than_j :=
reduction.highest_priority_job_other_than_j job_arrival job_task arr_seq higher_eq_priority
job_cost job_suspension_duration j R sched_jitter.
Let is_valid_jitter_aware_schedule :=
valid_jitter_aware_schedule job_arrival arr_seq job_higher_eq_priority
inflated_job_cost job_jitter.
Lemma sched_jitter_jobs_come_from_arrival_sequence:
jobs_come_from_arrival_sequence sched_jitter arr_seq.
Lemma sched_jitter_jobs_execute_after_jitter:
jobs_execute_after_jitter job_arrival job_jitter sched_jitter.
Lemma sched_jitter_completed_jobs_dont_execute:
completed_jobs_dont_execute inflated_job_cost sched_jitter.
Lemma sched_jitter_work_conserving:
jitter_aware.work_conserving job_arrival inflated_job_cost job_jitter arr_seq sched_jitter.
Lemma sched_jitter_respects_policy:
jitter_aware.respects_FP_policy job_arrival inflated_job_cost job_jitter
job_task arr_seq sched_jitter higher_eq_priority.
Corollary sched_jitter_is_valid: is_valid_jitter_aware_schedule sched_jitter.
Lemma sched_jitter_does_not_pick_j:
∀ j_hp t,
arrives_in arr_seq j_hp →
j_hp != j →
pending job_arrival inflated_job_cost job_jitter sched_jitter j_hp t →
higher_eq_priority (job_task j_hp) (job_task j) →
~~ scheduled_at sched_jitter j t.
End ScheduleIsValid.
End ProvingScheduleProperties.
End JitterScheduleProperties.