Table of Contents
Fetching ...

ALFRED: Virtual Memory for Intermittent Computing

Andrea Maioli, Luca Mottola

TL;DR

ALFRED tackles intermittently powered computing by introducing a virtual memory abstraction that automatically maps program state between volatile and non-volatile memory at compile time. It achieves this through a pipeline of machine-code transformations: relocating final writes to non-volatile memory, deferring restoration reads, and consolidating reads with possible volatile copies, all within a memory-layout and normalization framework that handles compile-time uncertainty. The approach is architecture-agnostic, implemented on an LLVM-like IR via the ScEpTIC emulator, and evaluated against multiple baselines showing substantial energy reductions (up to two orders of magnitude in some setups) and fewer restores, enabling workloads to finish sooner. The work demonstrates that careful compile-time memory management can dramatically improve the energy efficiency of batteryless devices without requiring new programming models, with practical impact on sense-process-transmit workloads in energy harvesting systems.

Abstract

We present ALFRED: a virtual memory abstraction that resolves the dichotomy between volatile and non-volatile memory in intermittent computing. Mixed-volatile microcontrollers allow programmers to allocate part of the application state onto non-volatile main memory. Programmers are therefore to explore manually the trade-off between simpler management of persistent state against the energy overhead for non-volatile memory operations and intermittence anomalies due to re-execution of non-idempotent code. This approach is laborious and yields sub-optimal performance. We take a different stand with ALFRED: we provide programmers with a virtual memory abstraction detached from the specific volatile nature of memory and automatically determine an efficient mapping from virtual to volatile or non-volatile memory. Unlike existing works, ALFRED does not require programmers to learn a new programming model or language syntax, while the mapping is entirely resolved at compile-time, reducing the run-time energy overhead. We implement ALFRED through a series of program machine-level code transformations. Compared to existing systems, we demonstrate that ALFRED reduces energy consumption by up to two orders of magnitude given a fixed workload. This enables the workloads to finish sooner, as the use of available energy shifts from ensuring forward progress to useful application processing.

ALFRED: Virtual Memory for Intermittent Computing

TL;DR

ALFRED tackles intermittently powered computing by introducing a virtual memory abstraction that automatically maps program state between volatile and non-volatile memory at compile time. It achieves this through a pipeline of machine-code transformations: relocating final writes to non-volatile memory, deferring restoration reads, and consolidating reads with possible volatile copies, all within a memory-layout and normalization framework that handles compile-time uncertainty. The approach is architecture-agnostic, implemented on an LLVM-like IR via the ScEpTIC emulator, and evaluated against multiple baselines showing substantial energy reductions (up to two orders of magnitude in some setups) and fewer restores, enabling workloads to finish sooner. The work demonstrates that careful compile-time memory management can dramatically improve the energy efficiency of batteryless devices without requiring new programming models, with practical impact on sense-process-transmit workloads in energy harvesting systems.

Abstract

We present ALFRED: a virtual memory abstraction that resolves the dichotomy between volatile and non-volatile memory in intermittent computing. Mixed-volatile microcontrollers allow programmers to allocate part of the application state onto non-volatile main memory. Programmers are therefore to explore manually the trade-off between simpler management of persistent state against the energy overhead for non-volatile memory operations and intermittence anomalies due to re-execution of non-idempotent code. This approach is laborious and yields sub-optimal performance. We take a different stand with ALFRED: we provide programmers with a virtual memory abstraction detached from the specific volatile nature of memory and automatically determine an efficient mapping from virtual to volatile or non-volatile memory. Unlike existing works, ALFRED does not require programmers to learn a new programming model or language syntax, while the mapping is entirely resolved at compile-time, reducing the run-time energy overhead. We implement ALFRED through a series of program machine-level code transformations. Compared to existing systems, we demonstrate that ALFRED reduces energy consumption by up to two orders of magnitude given a fixed workload. This enables the workloads to finish sooner, as the use of available energy shifts from ensuring forward progress to useful application processing.

Paper Structure

This paper contains 30 sections, 5 equations, 32 figures.

Figures (32)

  • Figure 1: ALFRED compile-time pipeline.
  • Figure 2: Example of mapping write operations.
  • Figure 3: Example of mapping read operations.
  • Figure 4: Consolidating read operations.
  • Figure 5: Example of the same group of instructions accessing multiple memory locations.
  • ...and 27 more figures