Holistic Efficiency and Determinism for Autonomous Embedded Systems
Date
Authors
ORCID
Journal Title
Journal ISSN
Volume Title
Publisher
item.page.doi
Abstract
Autonomous Embedded Systems (AES), where software and embedded hardware components work in tandem to autonomously sense and/or manipulate the physical world, have become increasingly more sophisticated in the past decade, culminating in the emergence of complex systems such as autonomous vehicles. Often, the complex design makes it difficult to effectively test and verify these systems, potentially causing unpredictable and unintended behavior. In addition, AES have design constraints such as Space, Weight, and Power (SWaP) limitations, and generally need to conform to many safety requirements and regulations. Often, these constraints and requirements contradict each other. For example, more accurate control methods could result in safer operation, yet, increase energy consumption. These contradictions could result in a suboptimal design. This dissertation attempts to take a constructive step towards more testable, energy-efficient, accurate, and timing-predictable AES. It is recognized that AES are constructed from multiple layers of software and hardware components. Adhering to the overall design goals of the system requires solving unique challenges and trade-offs for each layer. At the application layer, it is recognized that the emergence of Deep Neural Networks (DNNs) imposes the biggest challenge for modern AES. DNNs in AES must be energy-efficient, accurate, and timing-predictable (where temporal constraints are honored), three goals that often contradict each other. We take an incremental approach to solving this multidimensional optimization problem. First, PredJoule is presented, a framework that is capable of meeting energy consumption goals at runtime while meeting temporal constraints for DNN tasks. Second, ApNet is presented that allows for the system to dynamically adjust DNN accuracy to honor temporal constraints. Finally, NeuOS is presented. NeuOS is a framework that is built upon the insights and techniques of PredJoule and ApNet, but allows the system to optimize energy consumption and accuracy at the same time, while ensuring timing-predictability at runtime for multiple DNN tasks. At the hardware level, it is recognized that memory is a limited and contentious resource that is often shared across multiple processors and accelerators on a single System-on-Chip (SoC). Limitations in memory (both in terms of space and bandwidth) can make the system unstable and cause critical tasks to take longer to execute or fail, even with modern techniques such as on-demand memory swapping. To offer a more predictable alternative for AES, ResCue is presented. ResCue can take over the memory management task in AES, bringing data in and out of memory in a manner that guarantees timing-predictability. Finally, the focus is turned to the middleware, a layer that sits in-between the application and the hardware layers. Using a modern and complex open-source autonomous driving software, Autoware.Auto, as a case study, it will be empirically shown that the middleware can cause subtle, but critical unpredictable behavior that is normally hard to detect. Moreover, it will be shown that the middleware used in Autoware.Auto lacks the ability to offer strong consistency, leading to an untestable system. To offer a concrete remedy, Xronos is proposed, based on Lingua Franca. Xronos is a framework with a semantic notion of time and built-in coordination mechanisms that preserve strong consistency as well as temporal semantics in modern distributed AES.