Hardware Reference
In-Depth Information
D 1
τ 1
r 1
d 1
D 2
(a)
τ 2
r 2
d 2
D 1
τ 1
r 1
d 1
D 2
(b)
τ 2
r 2
d 2
Figure 7.17
Although π 2
1
, under EDF p 2
can be higher than p 1
(a) or lower than
p 1
(b).
In general, n k
denotes the number of currently available units for R k , meaning that
N k
n k units are locked. If n k =0, a task requiring 3 units of R k is blocked until n k
becomes greater than or equal to 3.
RESOURCE REQUIREMENTS
When entering a critical section z i,k guarded by a multi-unit semaphore S k , a task τ i
must specify the number of units it needs by calling a wait ( S k ,r ), where r is the num-
ber of requested units. When exiting the critical section, τ i
must call a signal ( S k ),
which releases all the r units.
The maximum number of units that can be simultaneously requested by τ i to R k is
denoted by μ i ( R k ), which can be derived off-line by analyzing the task code. It is
clear that if τ i requires more units than are available, that is, if μ i ( R k ) >n k , then τ i
blocks until n k
becomes greater than or equal to μ i ( R k ).
RESOURCE CEILING
Each resource R k (or semaphore S k ) is assigned a ceiling C Rk ( n k ) equal to the high-
est preemption level of the tasks that could be blocked on R k if issuing their maximum
request. Hence, the ceiling of a resource is a dynamic value, which is a function of the
Search WWH ::




Custom Search