WoCA: Avoiding Intermittent Execution in Embedded Systems by Worst-Case Analyses with Device States
Embedded systems with intermittent energy supply have the potential to revolutionize our understanding of the Internet of Things, as they are energy-self-sufficient due to energy harvesting. Existing intermittent-computing approaches, running directly from non-volatile memory, allow incremental progress of machine-code instructions. However, this type of progress does not apply for many devices (i.e., sensors, transceivers) since they have transactional (i.e., all-or-nothing) semantics: Power failures during such transactions (i.e., transmitting packets) lead to the problem of starvation, when continuously experiencing failed attempts.
To address this problem, we introduce WoCA, an approach that exploits static, whole-system worst-case analysis for device-driven intermittent computing. Along with the system’s currently available energy, WoCA enables transactional device uses and, thereby, guarantees forward progress. WoCA’s novel static analysis approach keeps track of program-path-sensitive device states and transitions to yield accurate energy bounds. Based on these bounds, WoCA’s runtime system decides when to safely execute code between checkpoints. Our evaluations with energy measurements on WoCA’s hardware platform, with state-of-charge assessment support, validate that WoCA makes more efficient use of available energy resources compared to worst-case-agnostic approaches, while WoCA also gives runtime guarantees.