Priority Inversion
Priority Inversion — A scheduling condition where a high-priority task is effectively blocked by a lower-priority task that owns a required shared resource.
How It Happens
A high-priority task cannot progress when it needs a shared resource, such as a mutex, that is held by a lower-priority task. If medium-priority work keeps preempting the lower-priority owner, the high-priority task can remain blocked far longer than expected.
The concept is more specific than simply having threads with different priorities: a resource dependency effectively reverses the intended priority order.
Real-Time Impact
Priority inversion can invalidate worst-case response-time assumptions and cause missed deadlines. With priority inheritance, the lower-priority owner can temporarily inherit the priority of the blocked high-priority task. Priority-ceiling protocols provide a different bounding strategy.
Design Note
Keeping critical sections short helps but does not by itself prove a bound. Resource dependencies and scheduler behavior have to be analyzed together.