The Stack Resource Policy (SRP) 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.
[1] SRP is not the same as the Priority ceiling protocol which is for fixed priority tasks (FP).
Each task is assigned a preemption level based upon the following formula where
denotes the deadline of task
π
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
is the maximum units of
may require at any one time.
) = m a x ( { 0 } ∪ { π (
There is also a system ceiling
π ′
which is the maximum of all current ceilings of the resources.
that wishes to preempt the system must first satisfy the following constraint:
This can be refined for Operating System implementation (as in MarteOS) 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.