The major requirement from manufacturers designing embedded systems for high-volume products is to keep production costs as low as possible. The most costeffective solution is to use small single chip microcontrollers / DSPs. Developers of software for resource constrained systems are increasingly in a difficult position: they have to write complex programs that must fit into very low cost microcontrollers and yet endproduct quality must not suffer. This leads to a desire to use a real-time operating system (RTOS), yet remain within on-chip memory limits (typically 512bytes to 4K RAM). This is not possible with many conventional RTOS, which allocate a separate stack for each task. We ask the question "why don't they use a single stack?" and explain the key elements of an execution model required for single stack operation. The novel concept of non-preemption groups is introduced and shown to enable significant reductions in stack size. An effective priority allocation algorithm is essential to realize the advantages of non-preemption groups. The results of applying such an algorithm show that the number of preemption levels required to maintain schedulability is strongly correlated with the spread of deadlines and for typical systems is relatively small. We conclude that a priority allocation algorithm combined with the non-preemption group mechanism reduces stack requirements by a significant factor. This enables efficient operation using an RTOS, whilst remaining within on-chip memory limits. Stack requirements are similar to those for a cyclic executive.

BibTex Entry

@inproceedings{Davis2000,
 author = {R.I. Davis and N. Merriam and N.J. Tracey},
 booktitle = {Work in Progress and Industrial Experience Sessions, 12th EuroMicro Conference on Real-Time Systems},
 month = {June},
 title = {How Embedded Applications Using an RTOS can stay within On-chip Memory Limits},
 year = {2000}
}