Real-Time Systems

, Volume 3, Issue 1, pp 67–99 | Cite as

Stack-based scheduling of realtime processes

  • T. P. Baker


The Priority Ceiling Protocol (PCP) of Sha, Rajkumar and Lehoczky is a policy for locking binary semaphores that bounds priority inversion (i.e., the blocking of a job while a lower priority job executes), and thereby improves schedulability under fixed priority preemptive scheduling. We show how to extend the PCP to handle: multiunit resources, which subsume binary semaphores and reader-writer locks; dynamic priority schemes, such as earliest-deadline-first (EDF), that use static “preemption levels”; sharing of runtime stack space between jobs. These extensions can be applied independently, or together.

The Stack Resource Policy (SRP) is a variant of the SRP that incorporates the three extensions mentioned above, plus the conservative assumption that each job may require the use of a shared stack. This avoids unnecessary context switches and allows the SRP to be implemented very simply using a stack. We prove a schedulability result for EDF scheduling with the SRP that is tighter than the one proved previously for EDF with a dynamic version of the PCP.

The Minimal SRP (MSRP) is a slightly more complex variant of the SRP, which has similar properties, but imposes less blocking. The MSRP is optimal for stack sharing systems, in the sense that it is the least restrictive policy that strictly bounds priority inversion and prevents deadlock for rate monotone (RM) and earliest-deadline-first (EDF) scheduling.


Sharing System Conservative Assumption Priority Scheme Preemptive Schedule Restrictive Policy 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. U.S. Department of Defense. 1983. Military Standard Ada Programming Language, ANSI/MILSTD1815A, Ada Joint Program Office.Google Scholar
  2. Baker, T.P., and Scallon, G.L. 1986. An Architecture for Real-Time Software Systems. IEEE Software, 50–59; reprinted in Hard-Real-Time Systems, Washington, DC: IEEE Press (1988).Google Scholar
  3. Baker, T.P. 1989. A Fixed-Point Approach to Bounding Blocking Time in Real-Time Systems. Technical Report, Department of Computer Science, Florida State University, Tallahassee, FL 32306.Google Scholar
  4. Baker, T.P., Malec, C., and Wilson, R. 1989. Practical Tasking. Boeing Aerospace and Electronics Company white paper.Google Scholar
  5. Baker, T.P. 1990. Preemption vs. Priority, and the Importance of Early Blocking. Proceedings of the Seventh IEEE Workshop on Real-Time Operating Systems and Software, Charlottesville, VA (May): 44–48.Google Scholar
  6. Baker, T.P. 1990. A Stack-Based Resource Allocation Policy for Realtime Processes. Proceedings of the IEEE Real-Time Systems Symposium.Google Scholar
  7. Borger, M.W., and Rajkumar, R. 1989. Implementing Priority Inheritance Algorithms in an Ada Runtime System. Technical report, Software Engineering Institute, Carnegie Mellon University, Pittsburgh, PA.Google Scholar
  8. Chen, M.I., and Lin, K.J. 1989. Dynamic Priority Ceilings: A Concurrency Control Protocol for Real-Time Systems. Technical report UIUCDCS-R-89-1511, Department of Computer Science, University of Illinois at Urbana-Champaign.Google Scholar
  9. Coffman, E.G.Jr., and Denning, P.J. 1973. Operating Systems Theory. Englewood Cliffs, NJ: Prentice-Hall.Google Scholar
  10. Garey, M.R., and Johnson, D.S. 1979. Computers and Intractability. New York: W.H. Freeman.Google Scholar
  11. Ghazalie, T. 1990. Improving Aperiodic Response with Deadline Scheduling. Master's Thesis, Florida State University.Google Scholar
  12. Giering, E.W. III, and Baker, T.P. 1989. Toward the Deterministic Scheduling of Ada Tasks. Proceedings of the IEEE Real-Time Systems Symposium, 31–40.Google Scholar
  13. Habermann, A.N., and Nassi, I.R. 1980. Efficient Implementation of Ada Tasks. Technical report, Department of Computer Science, Carnegie Mellon University.Google Scholar
  14. Havender, J.W. 1968. Avoiding Deadlock in Multitasking Systems. IBM Systems Journal 7, 2: 74–84.Google Scholar
  15. Hilfinger, P.N. 1982. Implementation Strategies for Ada Tasking Idioms. Proceedings of the AdaTEC Conference on Ada, Arlington, VA: 26–30.Google Scholar
  16. Holt, R.C. 1971. On Deadlock in Computer Systems. Ph.D. Thesis, TR 71-91, Department of Computer Science, Cornell University.Google Scholar
  17. IEEE Computer Society. 1988. IEEE Standard Portable Operating System Interface for Computer Environments, Washington, DC: IEEE Press.Google Scholar
  18. Leung, J.Y.-T. and Merrill, M.L. 1980. A Note on Preemptive Scheduling of Periodic, Real-Time Tasks. Information Processing Letters 11, 3: 115–118.Google Scholar
  19. Leung, J.Y.-T., and Whitehead, J. 1982. On the Complexity of Fixed-Priority Scheduling of Periodic Real-Time Tasks. Performance Evaluation 2: 237–250.Google Scholar
  20. Liu, C.L., and Layland, J.W. 1973. Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment. JACM 20.1: 46–61.Google Scholar
  21. Mok, A.K.-L. 1983. Fundamental Design Problems of Distributed Systems for the Hard Real-Time Environment. Ph.D. Thesis, MIT.Google Scholar
  22. Rajkumar, R., Sha, L., Lehoczky, J.P., and Ramamritham, K. 1989. An Optimal Priority Inheritance Protocol for Real-Time Synchronization. Technical report, Carnegie Mellon University (submitted for publication).Google Scholar
  23. Rajkumar, R., Sha, L., and Lehoczky, J.P. 1988. Real-Time Synchronization Protocols for Multiprocessors. Proceedings of the Real-Time System Symposium, IEEE, 259–272.Google Scholar
  24. Sha, L., Lehoczky, J.P., and Rajkumar, R. 1986. Solutions for Some Practical Problems in Prioritized Preemptive Scheduling. Proceedings of the IEEE Real-Time Systems Symposium, 181–191.Google Scholar
  25. Sha, L., Rajkumar, R., and Lehoczky, J.P. 1987. Priority Inheritance Protocols, An Approach to Real-Time Synchronization. Technical report CMU-CS-87-181, Carnegie Mellon University.Google Scholar
  26. Sha, L., Rajkumar, R., and Lehoczky, J. 1988. A Priority Driven Approach to Real-Time Concurrency Control. Technical report, Carnegie Mellon University.Google Scholar
  27. Sprunt, B., Sha, L., and Lehoczky, J. 1989. Aperiodic Task Scheduling for Hard-Real-Time Systems. Real Time Systems 1, 1: 27–60.Google Scholar
  28. Sha, L., Rajkumar, R., and Lehoczky, J. 1989. Mode Change Protocols for Priority-Driven Preemptive Scheduling. Real Time Systems 1, 3: 243–264.Google Scholar
  29. Bic, L., and Shaw, A.C. 1988. The Logical Design of Operating Systems. Englewood Cliffs NJ: Prentice-Hall.Google Scholar

Copyright information

© Kluwer Academic Publishers 1991

Authors and Affiliations

  • T. P. Baker
    • 1
  1. 1.Department of Computer ScienceFlorida State UniversityTallahasseeUSA

Personalised recommendations