Hardware Reference
In-Depth Information
7.4
The maximum blocking time for
τ
2
is given by a push-through blocking on
Z
3
C
. For this to happen,
τ
3
must start first and must enter its critical section
Z
3
C
. Then,
τ
1
must preempt
τ
3
, so that
τ
3
can inherit the highest priority to
prevent
τ
2
from executing. The situation is illustrated in Figure 13.20.
W
C
τ
1
A
C
P
1
τ
2
A
B
τ
3
AB
C
C
Figure 13.20
Schedule produced by RM + PIP for the task set of Exercise 7.2.
7.5
To compute the maximum blocking time under the Priority Inheritance Proto-
col we reason as follows.
The set of critical sections that can potentially block
τ
1
is
{
Z
2
C
,
Z
3
B
,
Z
3
E
,
Z
4
A
,
Z
4
C
,
Z
4
E
}
. Among these, we have to select the three longest
ones, one for each lower priority task. Note that, if we select
Z
2
C
and
Z
3
E
, we cannot select
Z
4
E
(which is the longest of
τ
4
) because resource
E
has already been selected for
τ
3
, and we cannot select
Z
4
C
for the same
reason. So, we have to select
Z
4
A
. Hence, the maximum blocking time
for
τ
1
is
B
1
=(
δ
2
C
−
1) = 26.
Task
τ
2
can experience direct blocking on
Z
4
C
and push-through block-
ing on
Z
3
B
,
Z
3
E
,
Z
4
A
,
Z
4
C
, and
Z
4
E
. Hence, the set of critical sections
that can potentially block
τ
2
1) + (
δ
3
E
−
1) + (
δ
4
A
−
. It can be
blocked at most for the duration of two critical sections in this set. Thus,
we have
B
2
is
{
Z
3
B
,
Z
3
E
,
Z
4
A
,
Z
4
C
,
Z
4
E
}
=(
δ
3
E
−
1) + (
δ
4
C
−
1) = 21. Note that
Z
3
E
and
Z
4
E
cannot block
τ
2
together.
Task
τ
3
can experience direct blocking on
Z
4
E
and push-through block-
ing on
Z
4
A
,
Z
4
C
, and
Z
4
E
. Hence, the set of critical sections that can
block
τ
3
. It can be blocked at most for the duration
of one critical section in this set. Thus, we have
B
3
=
δ
4
E
−
is
{
Z
4
A
,
Z
4
C
,
Z
4
E
}
1=10.
Task
τ
4
cannot be blocked, because it is the task with the lowest priority (it
can only be preempted by higher priority tasks). Hence, we have
B
4
=0.
Search WWH ::
Custom Search