Library prosa.analysis.facts.jitter

Propagation of Release Jitter in Arrival Curves

In this module, we prove correct an approach to "hiding" release jitter by "folding" it into arrival curves.
Consider any type of tasks described by arrival curves and the corresponding jobs.
  Context {Task : TaskType} {arrival_curve : MaxArrivals Task}
          {Job : JobType} `{JobTask Job Task}.

Let original_arrival denote each job's actual arrival time ...
  Context {original_arrival : JobArrival Job}.

... and suppose the jobs are affected by bounded release jitter.
  Context `{TaskJitter Task} `{JobJitter Job}.

In the following, consider an arbitrary valid arrival sequence.
Recall the induced "release curve" and associated definitions.
  #[local] Existing Instance release_as_arrival.
  #[local] Existing Instance release_curve.

In the following, we let rel_seq denote the induced "release curve".
Suppose we are given a set of tasks ...
  Variable ts : seq Task.

... with valid bounds on release jitter.

Restated General Properties

We begin by restating general properties of delay propagation, specialized to the case of jitter propagation.
The arrival and release sequences contain an identical set of jobs.
  Corollary jitter_arrives_in_iff :
     j,
      arrives_in arr_seq j arrives_in rel_seq j.

The induced "release sequence" is valid.
If the arrival curve is structurally valid, then so is the induced release curve.
Furthermore, if the arrival curve correctly bounds arrivals according to arr_seq, then the "release curve" also correctly bounds releases according to rel_seq.

Jitter Propagation Properties

Next, we establish validity properties specific to jitter propagation. These are needed to apply response-time analysis results.
Since the arrival and release sequence describe identical sets of jobs, trivially all jobs continue to belong to the tasks in the task set.
Next, consider an arbitrary schedule of the workload.
  Context {PState : ProcessorState Job}.
  Variable sched : schedule PState.

Again, trivially, all jobs in the schedule continue to belong to the release sequence.
Let us now consider the execution costs.
  Context `{JobCost Job} `{TaskCost Task}.

Since the set of jobs didn't change, and since release jitter propagation does not change execution costs, job costs remain trivially valid.
If the given schedule respects release jitter, then it continues to do so after we've reinterpreted the release times to be the arrival times.
If the schedule is work-conserving, then it continues to be so after we've "hidden" release jitter by reinterpreting release times as arrival times.
If the given schedule is valid w.r.t. to original arrivals, then it continues to be valid after reinterpreting release times as arrival times.
In the following, suppose the given schedule is valid w.r.t. the original arrival times and jitter-affected readiness.
As one would think, the set of scheduled jobs remains unchanged. For technical reasons (dependence of the definition of scheduled_jobs_at on the arrival sequence), this is a lot less obvious at the Coq level than one intuitively might expect.
Unsurprisingly, on a uniprocessor, the scheduled job remains unchanged, too. Again, this is less straightforward than one might think due to technical reasons (type-class resolution).
Importantly, the schedule remains FP-policy compliant if it was so to begin with, despite the postponed arrival times.

Transferred Response-Time Bound

Finally, we state the main result, which is the whole point of jitter propagation in the first place: if it is possible to bound response times after release jitter has been folded into the arrival curves, then this implies a response-time bound for the original problem with jitter. This theorem conceptually corresponds to equations (5) and (6) in Audsley et al. (1993), but has been generalized to arbitrary arrival curves.
  • Audsley, N., Burns, A., Richardson, M., Tindell, K., and Wellings, A. (1993). Applying new scheduling theory to static priority preemptive scheduling. Software Engineering Journal, 8(5):284–292.