Hardware Reference
In-Depth Information
normal execution
critical section
τ 1
blocked
τ 2
τ 3
p 3
P 1
P 2
P 3
Figure 7.7
Example of schedule under HLP, where p 3
is raised at the level C ( R )= P 2
as soon as τ 3
starts using resource R .
Note that the schedule produced under HLP for the example generating priority inver-
sion is the same as the one shown in Figure 7.5, since the ceiling of the shared resource
is P 1 (the highest priority). Figure 7.7 shows another example in which the ceiling of
the shared resource is P 2 ; hence τ 1 can preempt τ 3 inside the critical section, whereas
τ 2 is blocked until τ 3 exits its critical section. The figure also shows how the active
priority of τ 3 is varied by the protocol during execution.
7.5.1
BLOCKING TIME COMPUTATION
Under HLP, a task τ i can only be blocked by critical sections belonging to lower
priority tasks with a resource ceiling higher than or equal to P i . Hence,
γ i =
{
Z j,k
|
( P j <P i ) and C ( R k )
P i }
.
Moreover, a task can be blocked at most once, as formally stated in the following
theorem.
Theorem 7.1 Under HLP, a task τ i can be blocked, at most, for the duration of a
single critical section belonging to the set γ i .
Search WWH ::




Custom Search