vNV-Heap: An Ownership-Based Virtually Non-Volatile Heap for Embedded Systems
Markus Elias Gerber, Luis Gerhorst, Ishwar Mudraje, Kai Vogelgesang, Thorsten Herfet, Peter Wägemann
TL;DR
The paper tackles the challenge of persistent state management in intermittently powered embedded systems that lack an MMU. It introduces vNV-Heap, an ownership-based, virtually non-volatile heap that leverages compile-time borrow-checking to provide memory safety, object virtualization, and bounded worst-case energy consumption during checkpoints. Key contributions include the concept of ownership-based virtual memory, a two-layer interface (convenient and guard-based), per-object metadata for dynamic swapping, and an energy-aware evaluation demonstrating improved energy efficiency and predictable performance on an ESP32-C3 with FRAM. The work demonstrates that safe, hardware-agnostic memory management is feasible for reactive intermittent computing, enabling more feature-rich IoT devices with strong resilience to power failures.
Abstract
The Internet of Batteryless Things might revolutionize our understanding of connected devices by harvesting required operational energy from the environment. These systems come with the system-software challenge that the intermittently powered IoT devices have to checkpoint their state in non-volatile memory to later resume with this state when sufficient energy is available. The scarce energy resources demand that only modified data is persisted before a power failure, which requires precise modification tracking. We present vNV-Heap, the first ownership-based virtually Non-Volatile Heap for intermittently powered systems with guaranteed power-failure resilience. The heap exploits ownership systems, a zero-cost (i.e., compile-time) abstraction for example implemented by Rust, to track modifications and virtualize object persistence. To achieve power-failure resilience, our heap is designed and implemented to guarantee bounded operations by static program code analysis: For example, the heap allows for determining a worst-case energy consumption for the operation of persisting modified and currently volatile objects. The evaluation of our open-source implementation on an embedded hardware platform (i.e., ESP32-C3) shows that using our heap abstraction is more energy efficient than existing approaches while also providing runtime guarantees by static worst-case bounds.
