Abstract
A large and increasing number of Internet-of-Things devices are not equipped with batteries and harvest energy from their environment. Many of them cannot be physically accessed once they are deployed (embedded in civil engineering structures, sent in the atmosphere or deep in the oceans). When they run out of energy, they stop executing and wait until the energy level reaches a threshold. Programming such devices is challenging in terms of ensuring memory consistency and guaranteeing forward progress. Previous work has proposed to insert checkpoints in the program so that execution can resume from well-defined locations. In this work, we propose to define these checkpoint locations based on statically-computed worst-case energy consumption of code sections. We also apply classical compiler optimizations in order to decrease the required number of checkpoints at runtime. As our method is based upon worst-case energy consumption, we can guarantee memory consistency and forward progress.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
A piece of code is idempotent if repeated subsequent invocations do not modify the state of the machine.
- 2.
Even in the presence of multiple return statements in, a function, a compiler can easily create a new block and add edges to it to guarantee a single exit node.
- 3.
The available energy can be related to the capacitance C through the formula \(E=\frac{1}{2}C (V_{start}^2 - V_{stop}^2)\), where \(V_{start}\) and \(V_{stop}\) represent voltages when the capacitor is full, and when the system is forced to stop because the voltage is too low.
References
Bacon, D.F., Graham, S.L., Sharp, O.J.: Compiler transformations for high-performance computing. ACM Comput. Surv. 26(4), 345–420 (1994)
Baghsorkhi, S.S., Margiolas, C.: Automating efficient variable-grained resiliency for low-power IoT systems. In: CGO, pp. 38–49. ACM (2018)
Balsamo, D., et al.: Hibernus++: a self-calibrating and adaptive system for transiently-powered embedded devices. IEEE TCAD 35(12), 1968–1980 (2016)
Balsamo, D., Weddell, A.S., Merrett, G.V., Al-Hashimi, B.M., Brunelli, D., Benini, L.: Hibernus: sustaining computation during intermittent supply for energy-harvesting systems. IEEE Embed. Syst. Lett. 7(1), 15–18 (2015)
Bhatti, N.A., Mottola, L.: HarvOS: efficient code instrumentation for transiently-powered embedded sensing. In: IPSN. IEEE (2017)
Bouziane, R., Rohou, E., Gamatié, A.: Energy-efficient memory mappings based on partial WCET analysis and multi-retention time STT-RAM. In: RTNS (2018)
Bouziane, R., Rohou, E., Gamatié, A.: Partial worst-case execution time analysis. In: Conférence d’informatique en Parallélisme, Architecture et Système (2018)
Colin, A., Lucia, B.: Chain: tasks and channels for reliable intermittent programs. In: ACM SIGPLAN Notices, vol. 51, pp. 514–530. ACM (2016)
Colin, A., Lucia, B.: Termination checking and task decomposition for task-based intermittent programs. In: International Conference on Compiler Construction. ACM (2018)
Georgiou, K., Xavier-de Souza, S., Eder, K.: The IoT energy challenge: a software perspective. IEEE Embedded Syst. Lett. 10(3), 53–56 (2018)
Grech, N., Georgiou, K., Pallister, J., Kerrison, S., Eder, K.: Static energy consumption analysis of LLVM IR programs. arXiv (2014)
Gustafsson, J., Betts, A., Ermedahl, A., Lisper, B.: The mälardalen WCET benchmarks: past, present and future. In: International Workshop on Worst-Case Execution Time Analysis (2010)
Hardy, D., Rouxel, B., Puaut, I.: The Heptane static worst-case execution time estimation tool. In: International Workshop on Worst-Case Execution Time Analysis (2017)
Jayakumar, H., Raha, A., Raghunathan, V.: QuickRecall: a low overhead HW/SW approach for enabling computations across power cycles in transiently powered computers. In: 27th International Conference on VLSI Design and 13th International Conference on Embedded Systems. IEEE (2014)
Johnson, R., Pearson, D., Pingali, K.: The program structure tree: computing control regions in linear time. In: ACM SigPlan Notices, vol. 29. ACM (1994)
Lattner, C., Adve, V.: LLVM: A compilation framework for lifelong program analysis & transformation. In: CGO. IEEE Computer Society (2004)
Li, H., Puaut, I., Rohou, E.: Tracing flow information for tighter WCET estimation: application to vectorization. In: RTCSA. IEEE (2015)
Li, Y.T.S., Malik, S.: Performance analysis of embedded software using implicit path enumeration. In: ACM SIGPLAN Notices, vol. 30. ACM (1995)
Lucia, B., Ransford, B.: A simpler, safer programming and execution model for intermittent systems. ACM SIGPLAN Not. 50(6), 575–585 (2015)
Maeng, K., Colin, A., Lucia, B.: Alpaca: intermittent execution without checkpoints. Oopsla 1 (2017)
Ransford, B., Lucia, B.: Nonvolatile memory is a broken time machine. In: Workshop on Memory Systems Performance and Correctness. ACM (2014)
Ransford, B., Sorber, J., Fu, K.: Mementos: system support for long-running computation on RFID-scale devices. In: ACM SIGARCH Computer Architecture News, vol. 39. ACM (2011)
Van Der Woude, J., Hicks, M.: Intermittent computation without hardware support or programmer intervention. In: USENIX OSDI (2016)
Wägemann, P., Distler, T., Hönig, T., Janker, H., Kapitza, R., Schröder-Preikschat, W.: Worst-case energy consumption analysis for energy-constrained embedded systems. In: ECRTS. IEEE (2015)
Wägemann, P., Distler, T., Janker, H., Raffeck, P., Sieh, V.: A kernel for energy-neutral real-time systems with mixed criticalities. In: RTAS. IEEE (2016)
Wilhelm, R., et al.: The worst-case execution-time problem–overview of methods and survey of tools. ACM TECS 7(3), 1–53 (2008)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Yarahmadi, B., Rohou, E. (2020). Compiler Optimizations for Safe Insertion of Checkpoints in Intermittently Powered Systems. In: Orailoglu, A., Jung, M., Reichenbach, M. (eds) Embedded Computer Systems: Architectures, Modeling, and Simulation. SAMOS 2020. Lecture Notes in Computer Science(), vol 12471. Springer, Cham. https://doi.org/10.1007/978-3-030-60939-9_12
Download citation
DOI: https://doi.org/10.1007/978-3-030-60939-9_12
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-60938-2
Online ISBN: 978-3-030-60939-9
eBook Packages: Computer ScienceComputer Science (R0)