skip to main content
research-article

Rethinking Java call stack design for tiny embedded devices

Authors Info & Claims
Published:12 June 2012Publication History
Skip Abstract Section

Abstract

The ability of tiny embedded devices to run large feature-rich programs is typically constrained by the amount of memory installed on such devices. Furthermore, the useful operation of these devices in wireless sensor applications is limited by their battery life. This paper presents a call stack redesign targeted at an efficient use of RAM storage and CPU cycles by a Java program running on a wireless sensor mote. Without compromising the application programs, our call stack redesign saves 30% of RAM, on average, evaluated over a large number of benchmarks. On the same set of bench-marks, our design also avoids frequent RAM allocations and deallocations, resulting in average 80% fewer memory operations and 23% faster program execution. These may be critical improvements for tiny embedded devices that are equipped with small amount of RAM and limited battery life. However, our call stack redesign is equally effective for any complex multi-threaded object oriented program developed for desktop computers. We describe the redesign, measure its performance and report the resulting savings in RAM and execution time for a wide variety of programs.

References

  1. AlgoWiKi: The Programmer's Compendium. http://algowiki.net/wiki/.Google ScholarGoogle Scholar
  2. Memsic: Wirless sensor networks. http://www.memsic.com/products/wireless-sensor-networks/.Google ScholarGoogle Scholar
  3. F. Aslam, L. Fennell, C. Schindelhauer, P. Thiemann, G. Ernst, E. Haussmann, S. Rührup, and Z. A. Uzmi. Optimized Java Binary and Virtual Machine for Tiny Motes. In Distributed Computing in Sensor Systems (DCOSS), volume 6131, chapter 2, pages 15--30. Springer Berlin Heidelberg, Berlin, Heidelberg, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. F. Aslam, L. Fennell, C. Schindelhauer, P. Thiemann, and Z. A. Uzmi. Offline GC: trashing reachable objects on tiny devices. In Proceedings of the 9th ACM Conference on Embedded Networked Sensor Systems, SenSys '11, pages 302--315, New York, NY, USA, 2011. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Biswas, T. W. Carley, M. S. Simpson, B. Middha, and R. Barua. Memory overflow protection for embedded systems using run-time checks, reuse, and compression. ACM Trans. Embedded Comput. Syst., 5(4):719--752, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. N. Brouwers, K. Langendoen, and P. Corke. Darjeeling, a Feature-Rich VM for the Resource Poor. In Proceedings of the 7th ACM Conference on Embedded Networked Sensor Systems, SenSys '09, pages 169--182, New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. I. Chakeres and C. Perkins. Dynamic MANET On-demand (DYMO) Routing. IETF (work in progress), 2010.Google ScholarGoogle Scholar
  8. Y. Choi and H. Han. Optimal register reassignment for register stack overflow minimization. ACM Trans. Archit. Code Optim., 3(1):90--114, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. W. D. Clinger. Proper tail recursion and space efficiency. In Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, PLDI '98, pages 174--185, New York, NY, USA, 1998. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. D. Gay, P. Levis, R. von Behren, M. Welsh, E. Brewer, and D. Culler. The nesc language: A holistic approach to net-worked embedded systems. volume 38, pages 1--11, New York, NY, USA, May 2003. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. O. Gnawali, R. Fonseca, K. Jamieson, D. Moss, and P. Levis. Collection Tree Protocol. In Proceedings of the 7th ACM Conference on Embedded Networked Sensor Systems, SenSys '09, pages 1--14. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Gregg, M. A. Ertl, and A. Krall. A fast java interpreter. In In Proceedings of the Workshop on Java, 2001.Google ScholarGoogle Scholar
  13. Janice J. Heiss. Sentilla's Pervasive Computing -- The Universe Is the Computer. 2008 JavaOne Conference.Google ScholarGoogle Scholar
  14. M. Johnson, M. Healy, P. Van De Ven, M. J. Hayes, J. Nelson, T. Newe, and E. Lewis. A comparative review of wireless sensor network mote technologies. 2009 IEEE Sensors, pages 1439--1442, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  15. T. Lindholm and F. Yellin. Java Virtual Machine Specification. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2nd edition, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. B. Middha, M. S. Simpson, and R. Barua. Mtss: Multitask stack sharing for embedded systems. ACM Trans. Embedded Comput. Syst., 7(4), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. Regehr, A. Reid, and K. Webb. Eliminating stack overflow by abstract interpretation. ACM Trans. Embedded Comput. Syst., 4(4):751--778, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S. Schäckeler and W. Shang. Stack size reduction of recursive programs. In T. Kim, P. Sainrat, S. S. Lumetta, and N. Navarro, editors, CASES, pages 48--52. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Schoeberl, T. B. Preusser, and S. Uhrig. The embedded Java benchmark suite JemBench. In Proceedings of the 8th International Workshop on Java Technologies for Real-Time and Embedded Systems, JTRES '10, pages 120--127, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Y. Shi, K. Casey, M. A. Ertl, and D. Gregg. Virtual machine showdown: Stack versus registers. ACM Trans. Archit. Code Optim., 4:2:1--2:36, January 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. Spoonhower, G. Blelloch, and R. Harper. Using page residency to balance tradeoffs in tracing garbage collection. In Proceedings of the 1st ACM/USENIX international conference on Virtual execution environments, VEE '05, pages 57--67, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Systronix. A practical engineering approach to using embedded java in real-world applications. http://www.systronix.com/book/benchmark/benchmark.html.Google ScholarGoogle Scholar
  23. L. Yang, S. Chan, G. R. Gao, R. Ju, G.-Y. Lueh, and Z. Zhang. Inter-procedural stacked register allocation for itanium like architecture. In Proceedings of the 17th annual international conference on Supercomputing, ICS '03, pages 215--225, New York, NY, USA, 2003. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. X. Yang, N. Cooprider, and J. Regehr. Eliminating the call stack to save RAM. In Proceedings of the 2009 ACM SIGPLAN/SIGBED conference on Languages, compilers, and tools for embedded systems, LCTES '09, pages 60--69, New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Yi, H. Min, S. Lee, Y. Kim, and I. Jeong. Sesame: space-efficient stack allocation mechanism for multi-threaded sensor operating systems. In Proceedings of the 2007 ACM symposium on Applied computing, SAC '07, pages 1201--1202, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Rethinking Java call stack design for tiny embedded devices

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 47, Issue 5
    LCTES '12
    MAY 2012
    152 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2345141
    Issue’s Table of Contents
    • cover image ACM Conferences
      LCTES '12: Proceedings of the 13th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, Tools and Theory for Embedded Systems
      June 2012
      153 pages
      ISBN:9781450312127
      DOI:10.1145/2248418

    Copyright © 2012 ACM

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 12 June 2012

    Check for updates

    Qualifiers

    • research-article
  • Article Metrics

    • Downloads (Last 12 months)7
    • Downloads (Last 6 weeks)0

    Other Metrics

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!