Stack Resource Policy


The Stack Resource Policy is a resource allocation policy used in real-time computing, used for accessing shared resources when using earliest deadline first scheduling. It was defined by T. P. Baker. SRP is not the same as the Priority ceiling protocol which is for fixed priority tasks.

Function

Each task is assigned a preemption level based upon the following formula where denotes the deadline of task and denotes the preemption level of task i:
Each resource R has a current ceiling that represents the maximum of the preemption levels of the tasks that may be blocked, when there are units of available and is the maximum units of that may require at any one time. is assigned as follows:
There is also a system ceiling which is the maximum of all current ceilings of the resources.
Any task that wishes to preempt the system must first satisfy the following constraint:
This can be refined for Operating System implementation by removing the multi-unit resources and defining the stack resource policy as follows
The 2011 book Hard Real-Time Computing Systems: Predictable Scheduling Algorithms and Applications by Giorgio C. Buttazzo featured a dedicated section to reviewing SRP from Baker 1991 work.