Although conditional locking can an effective deadlock-avoidance mechanism,
it can be abused.
Consider for example the beautifully symmetric example shown in
Figure .
This example's beauty hids an ugly livelock.
To see this, consider the following sequence of events:
Quick Quiz 8.4:
How can the livelock shown in
Figure
be avoided?
End Quick Quiz
Starvation is very similar to livelock. Put another way, a livelock is an extreme form of starvation where all threads starve.