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.
Buy single article
Instant access to the full article PDF.
Tax calculation will be finalised during checkout.
Subscribe to journal
Immediate online access to all issues from 2019. Subscription will auto renew annually.
Tax calculation will be finalised during checkout.
Aarts, E. and J. Korst. Simulated Annealing and Boltzmann Machines. John Wiley & Sons, 1989.
Baker, T. Stack-Based Scheduling of Real-Time Processes. Journal of Real-Time Systems, vol.3, 1991.
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.
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.
Burchard, A., J. Liebeherr, Y. Oh, and S. Son. New Strategies for Assigning Real-Time Tasks to Multiprocessor Systems. IEEE Transactions on Computers, 1995.
Craig, T. S. Queuing Spin Lock Algorithms to Support Timing Predictability. In Proceedings of the IEEE Real-Time Systems Symposium, 1993.
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.
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.
Express Logic, I., http://www.threadx.com. available on Internet.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Natale, M. D. and J. Stankovic. Scheduling Distributed Real-Time Tasks with Minimum Jitter. Transactions on Computer, vol. 49, no.4, 2000.
Oh, Y. and S. H. Son. Allocating Fixed-Priority Periodic Tasks on Multiprocessor Systems. Journal on Real Time Systems, vol.9, 1995.
Rajkumar, R. Synchronization in Multiple Processor Systems. In Synchronization in Real-Time Systems: A Priority Inheritance Approach, Kluwer Academic Publishers, 1991.
Saksena, M. and Y. Wang. Scalable Real-Time System Design using Preemption Thresholds. In Proceedings of the Real Time Systems Symposium, 2000.
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.
Tindell, K., A. Burns, and A. Wellings. Allocating Real-Time Tasks (an NP-Hard Problem Made Easy). Real-Time Systems Journal, 1992.
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.
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
- Multiprocessor scheduling
- operating systems
- stack size minimization