DTA

Digital Theses Archive

 

Tesi etd-09272024-095750

Type of thesis
Dottorato
Author
GIANNESSI, RAFFAELE
URN
etd-09272024-095750
Title
Addressing dynamic memory allocation in safe and time predictable systems
Scientific disciplinary sector
ING-INF/05
Course
Istituto di Tecnologie della Comunicazione, dell'Informazione e della Percezione - PHD IN EMERGING DIGITAL TECHNOLOGIES
Committee
relatore Prof. BUTTAZZO, GIORGIO CARLO
Tutor Prof. BIONDI, ALESSANDRO
Keywords
  • Complex software
  • Dynamic memory allocation
  • Embedded systems
  • Failure analysis
  • Functional safety
  • Linux
  • Predictability
  • Real-time systems
  • Software reusability
  • STPA
Exam session start date
31/07/2025;
Availability
parziale
Abstract
Dynamic memory allocation is a pivotal feature of modern software systems but has mostly been used in general-purpose systems. <br>Due to the limited time predictability of dynamic memory allocators (DynMAs), their use in real-time systems is often discouraged. <br>Moreover, many safety standards and software guidelines such as ISO 26262 suggest to avoid the usage of such a feature in a safety domain.<br><br>The first part of this thesis focuses on safety-critical systems, which require software implemented under stringent rules and guidelines. <br>As system designers are transitioning to the usage of pre-existing software architectural elements to reduce time-to-market and costs, they face challenges in safety-critical applications. <br>Pre-existing software may have been implemented without following any safety and/or quality standard, and its documentation may be incomplete or unclear. <br>The safety qualification of such software according to the functional safety standard ISO 26262 may hence be very time consuming and expensive if not approached in a structured way.<br>To address this, the thesis introduces a structured methodology to achieve software hazardous behavior analysis. <br>This approach is the starting point to identify criticalities or abnormal conditions in pre-existing software, which can then be mitigated with adequate safety measures. <br>The proposed approach is applied to DynMA in the Linux kernel, driving the generation of its safety requirements to enable its integration into safety-critical applications.<br><br>The second part of this thesis focuses on real-time systems, which require that the response time of each request is bounded and sufficiently tight.<br>Although numerous general-purpose DynMAs have been developed over the years, only a few of them have been designed with the specific needs of real-time systems in mind. <br>Furthermore, the most notable one dates back to almost 20 years ago.<br>By analyzing and comparing modern allocators, the thesis describes the modifications applied to the Mimalloc general-purpose allocator to turn it into RT-Mimalloc, a real-time version designed to offer more predictable allocation times. <br>Then, we present a real-time analysis of RT-Mimalloc, establishing bounds on both allocation and deallocation times.<br>The evaluation of RT-Mimalloc is conducted using both modern benchmarks for memory allocation and synthetic workloads designed to test the allocator’s worst-case performance in real-time scenarios. <br>The results demonstrate that RT-Mimalloc significantly improves the longest observed allocation times compared to previous real-time DynMAs, while maintaining the high average-case performance typical of modern general-purpose allocators.<br>Finally, the same benchmarks have been used to compare empirical measurements with the analysis results and validate the allocation and deallocation bounds obtained from the real-time analysis of RT-Mimalloc.
Files