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: 一种虚拟记忆抽象, 解决了间歇计算中挥发性和非挥发性内存之间的二分法。 混合挥发性微控制器使程序员能够将应用状态的一部分分配到非挥发性主内存。 因此, 程序员将手动探讨更简单的持久性管理与非挥发性内存操作的能源管理与非挥发性内存操作的能源间接费用和间歇性异常之间的权衡。 这种方法是劳累性的, 并产生亚优性性性性能。 我们与 ALFRED 采取不同的立场: 我们向程序员提供一种与特定记忆的挥发性分离的虚拟内存抽象性, 并自动确定从虚拟到挥发性或非挥发性主要内存的有效映像。 与现有的工程不同, ALFRED并不要求程序员学习新的编程模型或语言合成法, 而由于重新执行非全时能性能源管理, 我们通过一系列程序机级代码转换来应用ALFRED。 与现有系统相比, 我们展示了虚拟内存的抽象性内存取性内存性内存性内存, 我们证明能性能性能工作能够提前完成能源消耗工作量。