Stack Resource Policy

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. Baker. SRP is not the same as the Priority ceiling protocol which is for fixed priority tasks (FP).
Function.
Each task is assigned a preemption level based upon the following formula where formula_1 denotes the deadline of task formula_2 and formula_3 denotes the preemption level of task i:
formula_4
Each resource R has a current ceiling formula_5 that represents the maximum of the preemption levels of the tasks that may be blocked, when there are formula_6 units of formula_7 available and formula_8 is the maximum units of formula_7 that formula_10 may require at any one time. formula_5 is assigned as follows: 
formula_12
There is also a system ceiling formula_13 which is the maximum of all current ceilings of the resources.
formula_14
Any task formula_10 that wishes to preempt the system must first satisfy the following constraint:
formula_16
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
Relevancy.
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.