What is Priority Inversion, and how does Priority Inheritance mitigate it?
Last updated
Priority inversion: a high-priority task (H) waits on a lock held by a low-priority task (L), while a medium task (M) preempts L, so H is effectively stalled by M (e.g. Mars Pathfinder resets).
Priority inheritance: L temporarily inherits H's priority while holding the lock, so M can't preempt it. L finishes, releases the lock, and reverts to its original priority.
Alternative: the priority ceiling protocol runs any lock holder at the lock's fixed ceiling priority, which also prevents deadlock.