Library prosa.model.task.arrival.periodic
The Periodic Task Model
Task Model Parameter for Periods
Consider any type of periodic tasks.
A valid periodic task has a non-zero period.
Further, in the context of a set of periodic tasks, ...
... every task in the set must have a valid period.
Next, consider any type of jobs stemming from these tasks ...
... and an arbitrary arrival sequence of such jobs.
We say that a task respects the periodic task model if the arrivals of
its jobs in the arrival sequence are separated by integer multiples of
the period.
Given two different jobs j and j' ...
...that belong to the arrival sequence...
... and that stem from the given task, ...
Every task in a set of periodic tasks must satisfy the above
criterion.
Definition taskset_respects_periodic_task_model :=
∀ tsk, tsk \in ts → respects_periodic_task_model tsk.
End ValidPeriodicTaskModel.
∀ tsk, tsk \in ts → respects_periodic_task_model tsk.
End ValidPeriodicTaskModel.
Treating Periodic Tasks as Sporadic Tasks
Any type of periodic tasks ...
... and their corresponding jobs ...
... may be interpreted as a type of sporadic tasks by using each task's
period as its minimum inter-arrival time ...
Global Instance periodic_as_sporadic : SporadicModel Task :=
{
task_min_inter_arrival_time := task_period
}.
{
task_min_inter_arrival_time := task_period
}.
... such that the model interpretation is valid, both w.r.t. the minimum
inter-arrival time parameter ...
Remark valid_period_is_valid_inter_arrival_time:
∀ tsk, valid_period tsk → valid_task_min_inter_arrival_time tsk.
Proof. trivial. Qed.
∀ tsk, valid_period tsk → valid_task_min_inter_arrival_time tsk.
Proof. trivial. Qed.
... and the separation of job arrivals.
Remark periodic_task_respects_sporadic_task_model:
∀ arr_seq tsk,
respects_periodic_task_model arr_seq tsk → respects_sporadic_task_model arr_seq tsk.
Proof.
move⇒ arr_seq tsk PERIODIC j j' NOT_EQ ARR_j ARR_j' TSK_j TSK_j' ORDER.
rewrite /task_min_inter_arrival_time /periodic_as_sporadic.
have PERIOD_MULTIPLE: ∃ n, n > 0 ∧ job_arrival j' = (n × task_period tsk) + job_arrival j
by apply PERIODIC ⇒ //.
move: PERIOD_MULTIPLE ⇒ [n [GT0 ->]].
rewrite addnC leq_add2r.
by apply leq_pmull.
Qed.
∀ arr_seq tsk,
respects_periodic_task_model arr_seq tsk → respects_sporadic_task_model arr_seq tsk.
Proof.
move⇒ arr_seq tsk PERIODIC j j' NOT_EQ ARR_j ARR_j' TSK_j TSK_j' ORDER.
rewrite /task_min_inter_arrival_time /periodic_as_sporadic.
have PERIOD_MULTIPLE: ∃ n, n > 0 ∧ job_arrival j' = (n × task_period tsk) + job_arrival j
by apply PERIODIC ⇒ //.
move: PERIOD_MULTIPLE ⇒ [n [GT0 ->]].
rewrite addnC leq_add2r.
by apply leq_pmull.
Qed.
For convenience, we state these obvious correspondences also at the level
of entire task sets.
Remark valid_periods_are_valid_inter_arrival_times:
∀ ts, valid_periods ts → valid_taskset_inter_arrival_times ts.
Proof. trivial. Qed.
Remark periodic_task_sets_respect_sporadic_task_model:
∀ ts arr_seq,
taskset_respects_periodic_task_model ts arr_seq →
taskset_respects_sporadic_task_model ts arr_seq.
Proof.
move⇒ ? ? PERIODIC ? ?.
apply periodic_task_respects_sporadic_task_model.
by apply PERIODIC.
Qed.
End PeriodicTasksAsSporadicTasks.
∀ ts, valid_periods ts → valid_taskset_inter_arrival_times ts.
Proof. trivial. Qed.
Remark periodic_task_sets_respect_sporadic_task_model:
∀ ts arr_seq,
taskset_respects_periodic_task_model ts arr_seq →
taskset_respects_sporadic_task_model ts arr_seq.
Proof.
move⇒ ? ? PERIODIC ? ?.
apply periodic_task_respects_sporadic_task_model.
by apply PERIODIC.
Qed.
End PeriodicTasksAsSporadicTasks.