Bao improves memory use and speed in devices with power loss
Bao: Automatic Region Placement and Memory Allocation for Intermittent Computing
Programming Languages
Summary
Batteryless devices that run on stored energy can stop suddenly when power runs out, making it hard to save their progress. The authors of this paper created Bao, a system that plans the best way to break tasks into smaller pieces and arrange memory so devices can restart smoothly without wasting energy. Bao uses a mathematical approach to find the best solution and guarantees that devices won't lose data. Tests showed Bao helped devices finish tasks 10% faster and reduce interruptions by half compared to older methods.
What this means in practice
- •For embedded device developers: Design batteryless devices that run efficiently despite frequent power losses by optimizing task division and memory setup.
- •For energy harvesting engineers: Build systems that safely manage intermittent energy and provide smoother operation in unstable power conditions.
Authors
Byeongjee Kang, Jan Hoffmann, Limin Jia, Brandon Lucia, Feras A. Saad
Abstract
Intermittent computing enables batteryless embedded devices to operate in harsh environment, but frequent power failures interrupt program execution and require careful management of state across power cycles. The core challenge is to guarantee both memory consistency and forward progress while minimizing the energy overhead of checkpointing. Recent compile-time approaches identify regions that fit in the energy buffer. At runtime, the device waits and recharges between the regions. However, they still rely on greedy or path-local heuristics that commit to local decisions and can miss globally lower-overhead boundary placements. To address this limitation, we present Bao, a system that jointly finds optimal energy-aware region formation and memory allocation decisions with formal correctness guarantees, by formulating it as a mixed-integer linear program. We prove that any feasible solution guarantees energy safety and implement our approach in LLVM. Our evaluation on 13 benchmarks across 3 capacitor sizes shows that Bao outperforms existing baselines, achieving 10% faster execution and 52% fewer region boundary hits on average compared to the best baseline.