Stack Size Minimization for Embedded Real-Time Systems-on-a-Chip

Abstract

The primary goal for real-time kernel software for single and multiple-processor on a chip systems is to support the design of timely and cost effective systems. The kernel must provide time guarantees, in order to predict the timely behaviorof the application, an extremely fast response time, in order not to waste computing power outside of the application cycles and save as much RAM space as possible in order to reduce the overall cost of the chip. The research on real-time software systems has produced algorithms that allow to effectively schedule system resources while guaranteeing the deadlines of the application and to group tasks in a very small number of non-preemptive sets which require much less RAM memory for stack. Unfortunately, up to now the research focus has been on time guarantees rather than on the optimization of RAM usage.Furthermore, these techniques do not apply to multiprocessor architectures which are likely to be widely used in future microcontrollers. This paper presents innovative scheduling and optimization algorithms that effectively solve the problem of guaranteeing schedulability with an extremely little operating system overhead and minimizing RAM usage. We developed a fast and simple algorithm for sharing resources in multiprocessor systems, together with an innovative procedure for assigning a preemption threshold to tasks. These allow the use of a single user stack. The experimental part shows the effectiveness of a simulated annealing-based tool that allows to find a schedulable system configuration starting from the selection of a near-optimal task allocation. When used in conjunction with our preemption threshold assignment algorithm, our tool further reduces the RAM usage in multiprocessor systems.

This is a preview of subscription content, access via your institution.

References

  1. 1.

    Aarts, E. and J. Korst. Simulated Annealing and Boltzmann Machines. John Wiley & Sons, 1989.

  2. 2.

    Baker, T. Stack-Based Scheduling of Real-Time Processes. Journal of Real-Time Systems, vol.3, 1991.

  3. 3.

    Baruah, S., A. Mok, and L. Rosier. Preemptively Scheduling Hard-Real-Time Sporadic Tasks on One Processor. In Proceedings of the 11th IEEE Real-Time Systems Symposium, 1990a, pp.182–190.

  4. 4.

    Baruah, S., L. Rosier, and R. Howell. Algorithms and Complexity Concerning the Preemptive Scheduling of Periodic Real-Time Tasks on One Processor. The Journal of Real-Time Systems, vol. 2, 1990b.

  5. 5.

    Burchard, A., J. Liebeherr, Y. Oh, and S. Son. New Strategies for Assigning Real-Time Tasks to Multiprocessor Systems. IEEE Transactions on Computers, 1995.

  6. 6.

    Craig, T. S. Queuing Spin Lock Algorithms to Support Timing Predictability. In Proceedings of the IEEE Real-Time Systems Symposium, 1993.

  7. 7.

    Davis, R., N. Merriam, and N. Tracey. How Embedded Applications Using an RTOS Can Stay Within On-Chip Memory Limits. In Proceedings of the Work in Progress and Industrial Experience Session, Euromicro Conference on Real-Time Systems, 2000.

  8. 8.

    Dertouzos, M. L. and A. K.-L. Mok. Multiprocessor On-Line Scheduling of Hard-Real-Time Tasks. IEEE Transactions on Software Engineering, vol. 15, no.12, 1989.

  9. 9.

    Express Logic, I., http://www.threadx.com. available on Internet.

  10. 10.

    Ferrari, A., S. Garue, M. Peri, S. Pezzini, L. Valsecchi, F. Andretta, and W. Nesci. The Design and Implementation of a Dual-Core Platform for Power-Train Systems. In Convergence 2000, Detroit, MI, USA, 2000.

  11. 11.

    Gai, P., G. Lipari, L. Abeni, M. di Natale, and E. Bini. Architecture for a Portable Open Source Real-Time Kernel Environment. In Proceedings of the Second Real-Time Linux Workshop and Hand's on Real-Time Linux Tutorial, 2000.

  12. 12.

    Gai, P., G. Lipari, and M. di Natale. An Algorithm for Stack Size Minimization in Embedded SoC, RETIS TR2001–04. Technical Report, ReTiS Lab, Scuola Superiore S. Anna, 2001.

  13. 13.

    Graham, R. Bounds on the Performance of Scheduling Algorithms.Chap. 5, E.G. Coffman Jr. (ed.) Computer and JobShop Scheduling Theory, Wiley, New York, 1976.

    Google Scholar 

  14. 14.

    Jeffay, K., D. F. Stanat, C. U. Martel. On Non-Preemptive Scheduling of Periodic and Sporadic Tasks. In Proceedings of the IEEE Real-Time Systems Symposium, 1991, pp.129–139.

  15. 15.

    Khemka, A. and R. K. Shyamasunda.Multiprocessor Scheduling of Periodic Tasks in a Hard Real-Time Environment. Technical report, Tata Institute of Fundamental Research, 1990.

  16. 16.

    Leung, J.Y.T. and J. Whitehead. On the Complexity of Fixed-Priority Scheduling of Periodic, Real-Time Tasks. Performance Evaluation, vol. 2, pp. 237–250, 1982.

    Google Scholar 

  17. 17.

    Lipari, G. and G. Buttazzo. Schedulability Analysis of Periodic and Aperiodic Tasks with Resource Constraints. Journal of Systems Architecture, vol. 46, pp. 327–338, 2000.

    Google Scholar 

  18. 18.

    Liu, C. and J. Layland. Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment. Journal of the Association for Computing Machinery, vol. 20, no.1, 1973.

  19. 19.

    Natale, M. D. and J. Stankovic. Scheduling Distributed Real-Time Tasks with Minimum Jitter. Transactions on Computer, vol. 49, no.4, 2000.

  20. 20.

    Oh, Y. and S. H. Son. Allocating Fixed-Priority Periodic Tasks on Multiprocessor Systems. Journal on Real Time Systems, vol.9, 1995.

  21. 21.

    Rajkumar, R. Synchronization in Multiple Processor Systems. In Synchronization in Real-Time Systems: A Priority Inheritance Approach, Kluwer Academic Publishers, 1991.

  22. 22.

    Saksena, M. and Y. Wang. Scalable Real-Time System Design using Preemption Thresholds. In Proceedings of the Real Time Systems Symposium, 2000.

  23. 23.

    Sha, L., R. Rajkumar, and J. P. Lehoczky. Priority Inheritance Protocols: An Approach to Real-Time Synchronization. IEEE Transactions on Computers, vol. 39, no.9, 1990.

    Google Scholar 

  24. 24.

    Tindell, K., A. Burns, and A. Wellings. Allocating Real-Time Tasks (an NP-Hard Problem Made Easy). Real-Time Systems Journal, 1992.

  25. 25.

    Wang, Y. and M. Saksena. Fixed Priority Scheduling with Preemption Threshold. In Proceedings of the IEEE International Conference on Real-Time Computing Systems and Applications, 1999.

Download references

Author information

Affiliations

Authors

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Gai, P., Lipari, G. & Di Natale, M. Stack Size Minimization for Embedded Real-Time Systems-on-a-Chip. Design Automation for Embedded Systems 7, 53–87 (2002). https://doi.org/10.1023/A:1019795414875

Download citation

  • Multiprocessor scheduling
  • operating systems
  • real-time
  • stack size minimization