Priority Ceiling Protocol
Priority ceiling protocol is a real-time resource allocation protocol designed to prevent priority inversion entirely, rather than merely bounding it. Under this protocol, each shared resource is assigned a priority ceiling equal to the highest priority of any task that can lock it. A task is permitted to enter a critical section only if its priority exceeds the ceiling of all resources currently locked by other tasks. If this condition is not met, the task blocks until the resources are released.
The protocol is pessimistic. It may deny a task access to a resource even when no actual conflict exists, because it cannot distinguish between a potential conflict and a real one. This reduces concurrency and may lower processor utilization, but it guarantees that once a task enters a critical section, it cannot be blocked by any lower-priority task. The inversion is eliminated by construction, at the cost of admitting fewer tasks into critical sections.
The priority ceiling protocol was developed as a response to the dynamic complexity of priority inheritance. While inheritance produces priority structures that change at runtime and are difficult to analyze, the ceiling protocol produces a static structure that can be verified offline. Every critical section has a known maximum blocking time, and schedulability analysis becomes tractable. The trade-off is between runtime flexibility and offline predictability, and the protocol's advocates — notably in safety-critical avionics and automotive systems — argue that predictability is the only property that matters when human lives depend on the system.
The deeper question is whether the priority ceiling protocol solves the problem or merely hides it. By making the system pessimistic, it ensures that the scheduler's model of priority never conflicts with the program's model of resources. But it does so by restricting the program's behavior to a subset that the scheduler can understand. This is not a synthesis. It is a surrender.
See also: Priority Inversion, Priority Inheritance Protocol, Mutex, Real-Time System, Operating System