Skip to main content

Compiler Optimizations for Safe Insertion of Checkpoints in Intermittently Powered Systems

  • Conference paper
  • First Online:
Embedded Computer Systems: Architectures, Modeling, and Simulation (SAMOS 2020)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 12471))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    A piece of code is idempotent if repeated subsequent invocations do not modify the state of the machine.

  2. 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. 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

  1. Bacon, D.F., Graham, S.L., Sharp, O.J.: Compiler transformations for high-performance computing. ACM Comput. Surv. 26(4), 345–420 (1994)

    Article  Google Scholar 

  2. Baghsorkhi, S.S., Margiolas, C.: Automating efficient variable-grained resiliency for low-power IoT systems. In: CGO, pp. 38–49. ACM (2018)

    Google Scholar 

  3. Balsamo, D., et al.: Hibernus++: a self-calibrating and adaptive system for transiently-powered embedded devices. IEEE TCAD 35(12), 1968–1980 (2016)

    Google Scholar 

  4. 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)

    Article  Google Scholar 

  5. Bhatti, N.A., Mottola, L.: HarvOS: efficient code instrumentation for transiently-powered embedded sensing. In: IPSN. IEEE (2017)

    Google Scholar 

  6. Bouziane, R., Rohou, E., Gamatié, A.: Energy-efficient memory mappings based on partial WCET analysis and multi-retention time STT-RAM. In: RTNS (2018)

    Google Scholar 

  7. 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)

    Google Scholar 

  8. Colin, A., Lucia, B.: Chain: tasks and channels for reliable intermittent programs. In: ACM SIGPLAN Notices, vol. 51, pp. 514–530. ACM (2016)

    Google Scholar 

  9. Colin, A., Lucia, B.: Termination checking and task decomposition for task-based intermittent programs. In: International Conference on Compiler Construction. ACM (2018)

    Google Scholar 

  10. Georgiou, K., Xavier-de Souza, S., Eder, K.: The IoT energy challenge: a software perspective. IEEE Embedded Syst. Lett. 10(3), 53–56 (2018)

    Article  Google Scholar 

  11. Grech, N., Georgiou, K., Pallister, J., Kerrison, S., Eder, K.: Static energy consumption analysis of LLVM IR programs. arXiv (2014)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. 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)

    Google Scholar 

  15. Johnson, R., Pearson, D., Pingali, K.: The program structure tree: computing control regions in linear time. In: ACM SigPlan Notices, vol. 29. ACM (1994)

    Google Scholar 

  16. Lattner, C., Adve, V.: LLVM: A compilation framework for lifelong program analysis & transformation. In: CGO. IEEE Computer Society (2004)

    Google Scholar 

  17. Li, H., Puaut, I., Rohou, E.: Tracing flow information for tighter WCET estimation: application to vectorization. In: RTCSA. IEEE (2015)

    Google Scholar 

  18. Li, Y.T.S., Malik, S.: Performance analysis of embedded software using implicit path enumeration. In: ACM SIGPLAN Notices, vol. 30. ACM (1995)

    Google Scholar 

  19. Lucia, B., Ransford, B.: A simpler, safer programming and execution model for intermittent systems. ACM SIGPLAN Not. 50(6), 575–585 (2015)

    Article  Google Scholar 

  20. Maeng, K., Colin, A., Lucia, B.: Alpaca: intermittent execution without checkpoints. Oopsla 1 (2017)

    Google Scholar 

  21. Ransford, B., Lucia, B.: Nonvolatile memory is a broken time machine. In: Workshop on Memory Systems Performance and Correctness. ACM (2014)

    Google Scholar 

  22. 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)

    Google Scholar 

  23. Van Der Woude, J., Hicks, M.: Intermittent computation without hardware support or programmer intervention. In: USENIX OSDI (2016)

    Google Scholar 

  24. 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)

    Google Scholar 

  25. 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)

    Google Scholar 

  26. Wilhelm, R., et al.: The worst-case execution-time problem–overview of methods and survey of tools. ACM TECS 7(3), 1–53 (2008)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bahram Yarahmadi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics