{'fraction_non_alphanumeric': 0.012838306731436502, 'fraction_numerical': 0.0, 'mean_word_length': 5.364238410596027, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Coarse grain memory management in real-time systems

As real-time and embedded systems become increasingly large and complex, the traditional strictly static approach to memory management begins to prove untenable. The high development costs and space requirements of the static approach need to be reduced at a minimal performance penalty and without compromising the predictability of the system. Therefore, the challenge is to provide a dynamic memory model that guarantees tight and bounded time and space requirements without overburdening the developer with memory concerns. The Real-Time Specification for Java (RTSJ) introduces a memory model in which applications create objects in scoped memory regions that can be allocated and freed dynamically. This allows applications to avoid garbage collection latencies and greatly reduces the fragmentation problems that a fine grain explicit memory management solution would incur. However, the RTSJ provides little information on how the model would be implemented in a virtual machine. In particular, there is no explicit requirement on the predictability of region allocation and deallocation. A second shortcoming – the high complexity of using the model in real-world applications – has inhibited uptake of the RTSJ. This thesis argues that a dynamic, coarse grain approach to memory management can help deliver tight time and space overheads at an acceptable development cost. The rationale behind this argument is formulated in a simple hypothesis that describes the correlation between space overheads, time overheads and program semantic information expressible and usable in a memory model. Adopting a scoped approach to coarse grain memory management such as that provided in the RTSJ will be shown to derive a tradeoff between space and time overheads that is attractive at times, but less so at others. The key contributions described in this thesis are constructed on a model that allows the lifetime of coarse grain memory regions to be expressed. Called the Region Partitioning Model, it enforces a separation between memory concerns and program logic and thereby serves two purposes. Firstly, it allows an exploration into the repercussions of enforcing a scoped approach to coarse grain memory management as well as the RTSJ’s implementation of this model. This motivates a number of changes and extension that address the shortcomings of the memory model as currently presented in the RTSJ. Secondly, by separating the memory management aspect from the application, it provides the basis for an environment offering low development and maintenance costs. The result is a model for developing RTSJ applications and a complementing extended RTSJ that addresses the prohibitive complexity of current development approaches while maintaining the performance and predictability advantages of the coarse grain model.