Priority Ceiling Protocol is an advanced task scheduling algorithm, principles of which were presented in the context of the Wireless Embedded Systems MSc.
can be used by multiple processes • Exclusive resources: protected against simultaneous use by more than one process using critical sections 3 April 2015
• Used to control access to exclusive resources • Usually implemented with semaphores • Semaphores: provided by the OS, bound to an exclusive resource • Semaphores can be used only by the wait and signal primitives 4 April 2015
a waiting state: task blocking • The maximum blocking time is very important for real- time systems • Deadlock: a situation where two or more tasks are waiting for each other to complete 5 April 2015
sections • A high priority task has to wait for a lower priority one to exit a critical section in order to enter its own • Happens when a low priority task has entered its critical section first • May create unbounded blocking as the waiting time depends on the execution time of lower priority tasks 6 April 2015
the priority of the blocked task • Plus: Bounds the maximum blocking time (which can be calculated) • Minus: Blocking time is not reduced and deadlocks are not prevented 10 April 2015
• Adds a rule for granting lock requests on semaphores: Each semaphore is assigned a priority ceiling • The ceiling is equal to the priority of the highest priority job that can lock the semaphore • A task can only lock a semaphore if its priority is higher than the larger priority ceiling among all locked semaphores • Makes sure that once a job enters a critical section it cannot be blocked by lower priority jobs 11 April 2015