Priority ceiling protocol
From Wikipedia, the free encyclopedia
In computer science, priority ceiling protocol is used in scheduling to avoid deadlock due to priority inversion.
The following describes the Immediate Ceiling Priority Protocol (ICPP). According to Alan Burns and Andy Wellings [1] this is called "Priority Protect Protocol" in POSIX and "Priority Ceiling Emulation" in Java. The Original Ceiling Priority Protocol (OCPP) has the same worst-case performance but is subtly different in the implementation which can provide finer grained priority inheritance control mechanism than ICCP.
In priority ceiling protocol, each resource is assigned a priority ceiling, which is a priority equal to the highest priority of any task which may lock the resource.
When a task locks the resource, its priority is temporarily raised to the priority ceiling, thus no task that may lock the resource is able to get scheduled.
- this allows a low priority task to defer execution of a higher-priority task
This is true of any scheme involving locked resources
- by doing this it prevents deadlock
A process will not get scheduled if any resource it may lock actually has been locked by another process.