Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Effect Of Resource Contention And Resource Access Control (Rac) 10/12/23, 9:51 AM

should complete sooner. Indeed, this reduction does allow jobs J2 and J3 to complete
sooner. Unfortunately, rather than meeting its deadline at 14, J1 misses its deadline
because it does not complete until 14.5.

More seriously, without good resource access control, the duration of a priority inversion
can be unbounded. The example in Figure 8–4 illustrates this fact. Here, jobs J1 and J3
have the highest priority and lowest priority, respectively. At time 0, J3 becomes ready
and executes. It acquires the resource R shortly afterwards and continues to execute.
After R is allocated to J3, J1 becomes ready. It preempts J3 and executes until it
requests resource R at time 3. Because the resource is in use, J1 becomes blocked, and
a priority inversion begins. While J3 is holding the resource and executes, a job J2 with a
priority higher than J3 but lower than J1 is released. Moreover, J2 does not require the
resource R. This job preempts J3 and executes to completion. Thus, J2 lengthens the
duration of this priority inversion. In this situation, the priority inversion is said to be
uncontrolled [ShRL90]. There can be an arbitrary number of jobs with priorities lower
than J1 and higher than J3 released in the meantime. They can further lengthen the
duration of the priority inversion. Indeed, when priority inversion is uncontrolled, a job
can be blocked for an infinitely long time.

Nonpreemptivity of resource allocation can also lead to deadlocks. The classic example
is one where there are two jobs that both require resources X and Y. The jobs are in
deadlock

when one of them holds X and requests for Y, while the other holds Y and requests for X.
The conditions that allow this circular wait of jobs for each other (i.e., a deadlock) to

https://www.skedsoft.com/books/real-time-systems/effect-of-resource-contention-and-resource-access-control-rac- Page 2 of 3
Effect Of Resource Contention And Resource Access Control (Rac) 10/12/23, 9:51 AM

occur are well-known [Crow, SiGa].

From these examples, we see that no resource access-control protocol can eliminate the
priority inversion and anomalous behavior caused by resource contention. A more
realistic goal of such a protocol is that it keeps the delays thus incurred as short as
possible. For this reason, a criterion we use to measure the performance of a resource
access-control protocol is the blocking time of each job. A good resource access-
control protocol should control priority inversion and prevent deadlock and, thus, keep
the blocking time of every job bounded from the above.

© Skedsoft 2012-2020

https://www.skedsoft.com/books/real-time-systems/effect-of-resource-contention-and-resource-access-control-rac- Page 3 of 3

You might also like