Deeply embedded systems often face harsh resource constraints, especially the real-time control systems employed in the automotive industry. Especially the memory consumption often leads to higher production costs, since a single byte more memory consumption on a can result in the need to buy the larger microcontroller. One source of large static memory consumption in such systems is the stack memory that must be allocated statically before the actual run time.
Normally, every thread owns one stack. However, the automotive industry standard already has a notion of Basic Tasks, which can be allocated on the same physical stack. In previous work, we have the basic task mechanism to allow a thread to switch its execution onto the shared stack while it is running. Semi-Extended Tasks can live on two stack at the same time.
The goal of this thesis is to find points a given application where it is possible and optimal to switch to the shared stack. Therefore, an application and operating-system aware worst-case stack analysis must be developed. This analysis will then be the fitness function for an organical optimzation process to find the stack-switching points that are optimal to minimize the overall memory consumption.