Hardware Reference
In-Depth Information
normal execution
critical section
blocked
τ 1
τ 2
τ 3
t 0
t 1
t 2
t 3
t 4
t 5
t 6
Figure 7.5
Example of NPP preventing priority inversion.
normal execution
critical section
blocked
τ 1
τ 2
τ 3
Figure 7.6
Example in which NPP causes unnecessary blocking on τ 1
.
The dynamic priority is then reset to the nominal value P i when the task exits the criti-
cal section. Figure 7.5 shows how NPP solves the priority inversion phenomenon. This
method, however, is only appropriate when tasks use short critical sections because it
creates unnecessary blocking. Consider, for example, the case depicted in Figure 7.6,
where τ 1 is the highest-priority task that does not use any resource, whereas τ 2 and
τ 3 are low-priority tasks that share an exclusive resource. If the low-priority task τ 3
enters a long critical section, τ 1
may unnecessarily be blocked for a long period of
time.
Search WWH ::




Custom Search