A situation occasionally arises in operating system theory known as “priority inversion”. This is an interesting situation where a low-priority process holds a resource required by a high-priority process. The high priority process therefore cannot run until the low-priority process releases its resource, which it cannot do until its scheduled time slice. This results in the low priority process effectively gaining prioritization over the high-priority process. The situation gets even weirder because both processes can be preempted by other processes running in the system despite higher prioritization. This can cause problems if these processes are critical to the operation of the system. Priority inversions can usually be solved by temporarily assigning the low priority process high priority so it can finish its work and release the blocked resource.
Anyway, I noticed a similarity while waiting at a traffic light. On the other side of the road was an ambulance waiting to make a left turn. In front of the ambulance were two cars. The light was red. The cars had nowhere to go; there was no side to veer off onto or anything of the sort. No one was coming in the other direction.
Here we have a high priority process (the emergency vehicle) blocked by two low-priority processes (the cars in front), which are waiting for the release of a critical section (the traffic light turning green).
As you might expect, the solution to this scenario is to give the cars in front the same priority as the ambulance (allow them to go through the red light), ensuring that the ambulance quickly becomes unblocked.