Priority Ceiling Protocol

In real-time computing, the priority ceiling protocol is a synchronization protocol for shared resources to avoid unbounded priority inversion and mutual deadlock due to wrong nesting of critical sections. In this 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.

For example, with priority ceilings, the shared mutex process (that runs the operating system code) has a characteristic (high) priority of its own, which is assigned to the task locking the mutex. This works well, provided the other high priority task(s) that tries to access the mutex does not have a priority higher than the ceiling priority.

In the Immediate Ceiling Priority Protocol (ICPP) when a task locks the resource its priority is temporarily raised to the priority ceiling of the resource, thus no task that may lock the resource is able to get scheduled. This allows a low priority task to defer execution of higher-priority tasks.

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 ICPP. Under this approach, a task can lock a resource only if its dynamic priority is higher than the current system priority. (The dynamic priority of a task is the maximum of its own static priority and any it inherits due to it blocking higher-priority processes. The system current priority is the ceiling of the resource having the highest ceiling among those locked by other tasks currently.) Otherwise the task is blocked, and its priority is inherited by the task currently holding the resource that gives the current system priority.

A task will not get scheduled if any resource it may lock actually has been locked by another task, and therefore the priority ceiling protocol prevents deadlocks.

ICPP is called "Ceiling Locking" in Ada, "Priority Protect Protocol" in POSIX and "Priority Ceiling Emulation" in RTSJ. It is also known as "Highest Locker's Priority Protocol" (HLP).

Read more about Priority Ceiling Protocol:  ICPP Versus OCPP

Famous quotes containing the words priority and/or ceiling:

    Weekend planning is a prime time to apply the Deathbed Priority Test: On your deathbed, will you wish you’d spent more prime weekend hours grocery shopping or walking in the woods with your kids?
    Louise Lague (20th century)

    Spooky things happen in houses densely occupied by adolescent boys. When I checked out a four-inch dent in the living room ceiling one afternoon, even the kid still holding the baseball bat looked genuinely baffled about how he possibly could have done it.
    Mary Kay Blakely (20th century)