This course is run at the The University of Nottingham within the School of Computer Science & IT. The course is run by Graham Kendall (EMAIL : gxk@cs.nott.ac.uk)
Of all the solutions we have looked at, both Peterson's and the TSL solutions
solve the mutual exclusion problem.
However, both of these solutions have the problem of busy waiting. That
is, if the process is not allowed to enter its critical section it sits in a
tight lop waiting for a condition to be met. This is obviously wasteful in terms
of CPU usage.
It can also have, not so obvious disadvantages.
Suppose we have two processes, one of high priority, h, and one of low priority,
l. The scheduler is set so that whenever h is in ready state it must be run.
If l is in its critical section when h becomes ready to run, l will be placed
in a ready state so that h can be run. However, if h tries to enter its critical
section then it will be blocked by l, which will never be given the opportunity
of running and leaving its critical section. Meantime, h will simply sit in
a loop forever.
This is sometimes called the priority inversion problem.
Last Page | Back to Main Index | Next Page |
Last Updated : 14/01/2002