Hardware Reference
In-Depth Information
hence, it is practically impossible to predict the exact location where a task is going to
be preempted.
Under deferred preemptions (floating model), the position of non-preemptive regions
is not specified in the model, thus they are considered to be unknown. In the activation-
triggered model, instead, the time at which the running task will be preempted is set
q i units of time after the arrival time of a higher priority task. Hence, the preemption
position depends on the actual execution of the running task and on the arrival time of
the higher priority task. Therefore, it can hardly be predicted off-line.
On the contrary, under cooperative scheduling, the locations where preemptions may
occur are explicitly defined by the programmer at design time; hence, the correspond-
ing overhead can be estimated more precisely by timing analysis tools. Moreover,
through the algorithm presented in Section 8.6.1, it is also possible to select the best
locations for placing the preemption points to minimize the overall preemption cost.
8.7.3
EFFECTIVENESS
Each of the presented methods can be used to limit preemption as much as desired, but
the number of preemptions each task can experience depends of different parameters.
Under preemption thresholds, a task τ i can only be preempted by tasks with priority
greater than its threshold θ i . Hence, if preemption cost is neglected, an upper bound
ν i on the number of preemptions that τ i can experience can be computed by counting
the number of activations of tasks with priority higher than θ i occurring in [0 ,R i ]; that
is
R i
T h
.
ν i =
h : P h i
This is an upper bound because simultaneous activations are counted as if they were
different, although they cause a single preemption.
Under deferred preemption, the number of preemptions occurring on τ i
is easier to
determine, because it directly depends on the non-preemptive interval q i
specified for
the task. If preemption cost is neglected, we simply have
ν i = C NP
i
q i
1 .
However, if preemption cost is not negligible, the estimation requires an iterative ap-
proach, since the task computation time also depends on the number of preemptions.
Search WWH ::




Custom Search