Tasks

RealTimeScheduling provides several different representations of real-time tasks. These include periodic tasks with implicit or explicit deadlines. Periodic tasks with weakly hard constraints are also supported.

The task types can be converted to one another automatically, and PeriodicImplicitTask objects can also be promoted to PeriodicTask when required (e.g. when putting both types of task into a single TaskSystem).

Task Attributes

Of course, methods are provided to get a task's period, relative deadline, and execution cost.

Utilization and density can be computed easily as well.

For weakly hard tasks, the minimum utilization and density may also be computed, multiplying the utilization and density by the maximum fraction of jobs that can be missed in an unbounded time horizon.

Testing Properties of Tasks

Sometimes it's useful to know how the deadline of a task relates to its period. RealTimeScheduling provides two functions for this.

Additionally, it's often important to know if a task's cost exceeds its period.

Time-Demand Analysis

Many schedulability tests make use of time-demand analysis (TDA). To support this, the common demand bound function (DBF) and request bound function (RBF) are implemented.

RealTimeScheduling.demand_boundMethod
demand_bound(τ::AbstractRealTimeTask, t)

Compute Baruah's demand bound function (DBF) for the task τ.

\[\max\left(0, \left\lfloor \frac{t - \mathrm{deadline}(τ)}{\mathrm{period}(τ)} + 1 \right\rfloor \mathrm{cost}(τ) \right)\]

source
RealTimeScheduling.request_boundMethod
request_bound(τ::AbstractRealTimeTask, t)

Compute the request bound function (RBF) for the task τ.

\[\left\lceil \frac{t}{\mathrm{period}(τ)}\right\rceil \mathrm{cost}(τ)\]

source