Inter-task register-allocation for static operating systems

Volker Barthelmann
2002 Proceedings of the joint conference on Languages, compilers and tools for embedded systems software and compilers for embedded systems - LCTES/SCOPES '02  
In recent years, a growing number of small single-chip embedded systems are used in very high volumes, for example in the automotive industry. Due to the high volumes, these systems are very cost-sensitive. This is one of several reasons why they are more and more using static operating systems. In such systems, all system resources are configured offline and an optimized kernel is generated which is tailored to one specific application. While this allows the use of operating systems for small
more » ... systems for small ECUs with only very few KB of RAM, it is observed that the memory needed to store task contexts (i.e. register sets) in case of task preemptions makes up a significant part of the RAM needed by the operating system (especially on chips with large register files). This paper presents ideas and a first implementation on methods to reduce this space through interaction of the compiler and the operating system generation. Together they can calculate an upper bound for the register set that has to be stored for each task. Also, the scope for the register allocator of the compiler can be extended to allocate registers across tasks in order to minimize the total size of RAM needed for task contexts.
doi:10.1145/513852.513855 fatcat:z4ara3vgqjhh3itefqu6sfnozm