skip to main content
article

Proactive and adaptive energy-aware programming with mixed typechecking

Published:14 June 2017Publication History
Skip Abstract Section

Abstract

Application-level energy management is an important dimension of energy optimization. In this paper, we introduce ENT, a novel programming language for enabling *proactive* and *adaptive* mode-based energy management at the application level. The proactive design allows programmers to apply their application knowledge to energy management, by characterizing the energy behavior of different program fragments with modes. The adaptive design allows such characterization to be delayed until run time, useful for capturing dynamic program behavior dependent on program states, configuration settings, external battery levels, or CPU temperatures. The key insight is both proactiveness and adaptiveness can be unified under a type system combined with static typing and dynamic typing. ENT has been implemented as an extension to Java, and successfully ported to three energy-conscious platforms: an Intel-based laptop, a Raspberry Pi, and an Android phone. Evaluation shows ENT improves the programmability, debuggability, and energy efficiency of battery-aware and temperature-aware programs.

References

  1. Advanced configuration and power interface, http:// www .acpi.info.Google ScholarGoogle Scholar
  2. Duckduckgo, https://github .com/duckduckgo/ android.Google ScholarGoogle Scholar
  3. Javaboy, http://www .millstone.demon.co.uk/ download/javaboy/.Google ScholarGoogle Scholar
  4. jspider, http://jspider.sourceforge.net.Google ScholarGoogle Scholar
  5. Materiallife, https://github .com/ juankysoriano/MaterialLife.Google ScholarGoogle Scholar
  6. Mopi, https://pi.gate.ac.uk/pages/mopi.html.Google ScholarGoogle Scholar
  7. Newpipe, https://github .com/TeamNewPipe/ NewPipe.Google ScholarGoogle Scholar
  8. Turn your pi into a low-cost hd serveillance cam, https: //www .raspberrypi.org/blog/turn-your-piinto-a-low-cost-hd-surveillance-cam/,.Google ScholarGoogle Scholar
  9. Satellite cameras saving endangered species, http: //www .cambridgeconsultants.com/news/pr/ release/140/en,.Google ScholarGoogle Scholar
  10. Emulation on raspberry pi 2, https:// www .raspberrypi.org/blog/emulation-onraspberry-pi-2/,.Google ScholarGoogle Scholar
  11. Raspberry pi, https://www.raspberrypi.org/,.Google ScholarGoogle Scholar
  12. Raspberry pi camera, https:// www .raspberrypi.org/documentation/ raspbian/applications/camera .md,.Google ScholarGoogle Scholar
  13. Raspberry pi camera java, https:// blogs .msdn.microsoft.com/robert mcmurray/ 2015/06/12/simple-java-wrapper-classfor-raspistill-on-the-raspberry-pi-2/,.Google ScholarGoogle Scholar
  14. Simbamon, https://github .com/ hamishcunningham/pi-tronics/tree/master/ simbamon.Google ScholarGoogle Scholar
  15. Soundrecorder, https://github .com/dkim0419/ SoundRecorder.Google ScholarGoogle Scholar
  16. Watts up? power meters, https:// www .wattsupmeters.com/secure/index.php.Google ScholarGoogle Scholar
  17. M. Abadi, L. Cardelli, B. Pierce, and G. Plotkin. Dynamic typing in a statically-typed language. In POPL ’89. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. N. Ayewah, W. Pugh, J. D. Morgenthaler, J. Penix, and Y. Zhou. Evaluating static analysis defect warnings on production software. PASTE ’07, pages 1–8.Google ScholarGoogle Scholar
  19. W. Baek and T. M. Chilimbi. Green: a framework for supporting energy-conscious programming using controlled approximation. In PLDI’10, pages 198–209. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. Boldi and S. Vigna. The webgraph framework i: Compression techniques. In Proceedings of the 13th International Conference on World Wide Web, WWW ’04, pages 595–602. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. P. Boldi, M. Rosa, M. Santini, and S. Vigna. Layered label propagation: A multiresolution coordinate-free ordering for compressing social networks. In S. Srinivasan, K. Ramamritham, A. Kumar, M. P. Ravindra, E. Bertino, and R. Kumar, editors, Proceedings of the 20th international conference on World Wide Web, pages 587–596. ACM Press, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. Bornholt, T. Mytkowicz, and M. Kathryn. Uncertain¡t¿: a first-order type for uncertain data. In ASPLOS ’14, pages 51– 66. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. B. Boston, A. Sampson, D. Grossman, and L. Ceze. Probability type inference for flexibile approximate programming. In OOPSLA ’15. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. P. Buiras, D. Vytiniotis, and A. Russo. Hlio: Mixing static and dynamic typing for information-flow control in haskell. In ICFP 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. T. Cao, S. M. Blackburn, T. Gao, and K. S. McKinley. The yin and yang of power and performance for asymmetric hardware and managed software. In ICSA ’12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. Carbin, S. Misailovic, and M. Rinard. Verifying quantitative reliability for programs that execute on unreliable hardware. In OOPSLA ’13, pages 33–52. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. L. Cardelli, S. Martini, J. C. Mitchell, and A. Scedrov. An extension of system f with subtyping. In Information and Computation, pages 750–770. Springer-Verlag, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. R. Cartwright and M. Fagan. Soft typing. In PLDI ’91. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. E. C ¸ ic¸ek, G. Barthe, M. Gaboardi, D. Garg, and J. Hoffmann. Relational cost analysis. In POPL ’17, pages 316–329.Google ScholarGoogle Scholar
  30. A. P. Chandrakasan, S. Sheng, and R. W. Brodersen. Low power cmos digital design. IEEE JOURNAL OF SOLID STATE CIRCUITS, 27:473–484, 1995.Google ScholarGoogle ScholarCross RefCross Ref
  31. M. Cohen, H. S. Zhu, S. E. Emgin, and Y. D. Liu. Energy types. In OOPSLA ’12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. H. David, E. Gorbatov, U. R. Hanebutte, R. Khanna, and C. Le. Rapl: Memory power estimation and capping. In ISLPED ’10, pages 189–194. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. R. B. Findler and M. Felleisen. Contracts for higher-order functions. In ICFP ’02, pages 48–59. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. C. Flanagan. Hybrid type checking. In POPL ’06. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. J. Flinn and M. Satyanarayanan. Energy-aware adaptation for mobile applications. In SOSP ’99. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1995. ISBN 0-201-63361-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. L. Gomez, I. Neamtiu, T. Azim, and T. Millstein. Reran: Timing- and touch-sensitive record and replay for android. In ICSE ’13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. H. Hoffmann. Jouleguard: Energy guarantees for approximate applications. In Proceedings of the 25th Symposium on Operating Systems Principles, SOSP ’15, pages 198–214. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. H. Hoffmann, S. Sidiroglou, M. Carbin, S. Misailovic, A. Agarwal, and M. Rinard. Dynamic knobs for responsive power-aware computing. In ASPLOS ’11,. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. J. Hoffmann, A. Das, and S.-C. Weng. Towards automatic resource bound analysis for ocaml. In POPL ’17, pages 359– 373,. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. D. Hovemeyer and W. Pugh. Finding bugs is easy. SIGPLAN Not., 39(12):92–106, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. A. Igarashi, B. Pierce, and P. Wadler. Featherweight java - a minimal core calculus for java and gj. In TOPLAS ’99, pages 132–146. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. M. Kambadur and M. Kim. Nrg-loops: Adjusting power from within applications. In CGO ’16,. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. M. Kambadur and M. Kim. An experimental survey of energy management across the stack. In OOPSLA ’14, pages 329– 344,. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. S. Kaxiras and M. Martonosi. Computer Architecture Techniques for Power-Efficiency. Morgan and Claypool Publishers, 1st edition, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. B. S. Lerner, J. G. Politz, A. Guha, and S. Krishnamurthi. TeJaS: Retrofitting type systems for JavaScript. In Dynamic Languages Symposium (DLS) ’13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. K. Liu, G. Pinto, and Y. D. Liu. Data-oriented characterization of application-level energy optimization. In FASE ’15.Google ScholarGoogle Scholar
  48. Y. Long, Y. D. Liu, and H. Rajan. Intensional effect polymorphism. In ECOOP ’15, pages 346–370.Google ScholarGoogle Scholar
  49. G. Mainland, G. Morrisett, and M. Welsh. Flask: staged functional programming for sensor networks. In ICFP ’08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. S. Misailovic, M. Carbin, S. Achour, Z. Qi, and M. C. Rinard. Chisel: Reliability- and accuracy-aware optimization of approximate computational kernels. In OOPSLA ’14, pages 309–328. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. A. C. Myers. Jflow: practical mostly-static information flow control. In 26th ACM Symp. on Principles of Programming Languages (POPL), page 228241, January 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. B. D. Noble, M. Satyanarayanan, D. Narayanan, J. E. Tilton, J. Flinn, and K. R. Walker. Agile application-aware adaptation for mobility. pages 276–287, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. N. Nystrom, M. R. Clarkson, and A. C. Myers. Polyglot: An extensible compiler framework for java. In CC ’03, pages 138–152. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. A. Pathak, Y. C. Hu, and M. Zhang. Bootstrapping energy debugging on smartphones: A first look at energy bugs in mobile devices. HotNets-X ’11, pages 5:1–5:6,. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. A. Pathak, A. Jindal, Y. C. Hu, and S. P. Midkiff. What is keeping my phone awake?: Characterizing and detecting nosleep energy bugs in smartphone apps. In MobiSys ’12, pages 267–280,. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. G. Pinto, F. Castor, and Y. D. Liu. Understanding energy behaviors of thread management constructs. In OOPSLA ’14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. A. Sampson, W. Dietl, E. Fortuna, D. Gnanapragasam, L. Ceze, and D. Grossman. EnerJ: Approximate data types for safe and general low-power computation. In PLDI’11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. K. Shiv, K. Chow, Y. Wang, and D. Petrochenko. Specjvm2008 performance characterization. In Proceedings of the 2009 SPEC Benchmark Workshop on Computer Performance Evaluation and Benchmarking, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. J. Siek and W. Taha. Gradual typing for objects. In ECOOP ’07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. J. G. Siek and W. Taha. Gradual typing for functional languages. Scheme and Functional Programming Workshop, 6: 81–92, 2006.Google ScholarGoogle Scholar
  61. J. G. Siek, M. Vitousek, M. Cimini, and B. John. Refined criteria for gradual typing. In SNAPL ’15.Google ScholarGoogle Scholar
  62. J. Sorber, A. Kostadinov, M. Garber, M. Brennan, M. D. Corner, and E. D. Berger. Eon: a language and runtime system for perpetual systems. In SenSys ’07, pages 161–174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. Takikawa, Feltey, Dean, Flatt, Findler, Tobin-Hochstadt, and Felleisen. Toward practical gradual typing. In ECOOP ’15,.Google ScholarGoogle Scholar
  64. A. Takikawa, T. S. Strickland, C. Dimoulas, S. Tobin-Hochstadt, and M. Felleisen. Gradual typing for first-class classes. In OOPSLA ’12, pages 793–810,. Google ScholarGoogle ScholarDigital LibraryDigital Library
  65. T. Wrigstad, F. Z. Nardelli, S. Lebresne, J. Östlund, and J. Vitek. Integrating typed and untyped code in a scripting language. In POPL ’10, pages 377–388. Google ScholarGoogle ScholarDigital LibraryDigital Library
  66. S. Zdancewic and A. C. Myers. Secure information flow and cps. In 10th European Symposium on Programming, volume 2028, page 4661, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  67. H. S. Zhu, C. Lin, and Y. D. Liu. A programming model for sustainable software. In ICSE’15, pages 767–777, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Proactive and adaptive energy-aware programming with mixed typechecking

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 52, Issue 6
        PLDI '17
        June 2017
        708 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/3140587
        Issue’s Table of Contents
        • cover image ACM Conferences
          PLDI 2017: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation
          June 2017
          708 pages
          ISBN:9781450349888
          DOI:10.1145/3062341

        Copyright © 2017 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 14 June 2017

        Check for updates

        Qualifiers

        • article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!