priority inheritance
also: priority boost, priority promotion, PIP
A synchronization mechanism that temporarily boosts a low-priority task's priority to prevent a higher-priority task from being blocked waiting for a resource held by the lower-priority task.
Priority inheritance solves the priority inversion problem, where a high-priority process gets stuck waiting for a resource (like a mutex lock) held by a much lower-priority process. Without priority inheritance, the low-priority process might be preempted by medium-priority tasks, leaving the high-priority process starving for the resource.
When priority inheritance is enabled, the low-priority task holding the contested resource temporarily inherits the priority of the highest-priority waiter. This ensures the lock-holder runs at a high enough priority to quickly release the resource, preventing indefinite blocking of critical tasks.
Example: A real-time audio thread (priority 80) needs a mutex locked by a background cleanup thread (priority 10). The cleanup thread automatically inherits priority 80, runs quickly, releases the mutex, and returns to priority 10. Without this, medium-priority network threads could preempt the cleanup task indefinitely.
Priority inheritance is built into real-time kernels and supported by modern Linux mutexes via PTHREAD_PRIO_INHERIT attribute.