Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/2248418.2248420acmconferencesArticle/Chapter ViewAbstractPublication PagescpsweekConference Proceedingsconference-collections
research-article

Rethinking Java call stack design for tiny embedded devices

Published: 12 June 2012 Publication History

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/.
[2]
Memsic: Wirless sensor networks. http://www.memsic.com/products/wireless-sensor-networks/.
[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.
[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.
[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.
[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.
[7]
I. Chakeres and C. Perkins. Dynamic MANET On-demand (DYMO) Routing. IETF (work in progress), 2010.
[8]
Y. Choi and H. Han. Optimal register reassignment for register stack overflow minimization. ACM Trans. Archit. Code Optim., 3(1):90--114, 2006.
[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.
[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.
[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.
[12]
D. Gregg, M. A. Ertl, and A. Krall. A fast java interpreter. In In Proceedings of the Workshop on Java, 2001.
[13]
Janice J. Heiss. Sentilla's Pervasive Computing -- The Universe Is the Computer. 2008 JavaOne Conference.
[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.
[15]
T. Lindholm and F. Yellin. Java Virtual Machine Specification. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2nd edition, 1999.
[16]
B. Middha, M. S. Simpson, and R. Barua. Mtss: Multitask stack sharing for embedded systems. ACM Trans. Embedded Comput. Syst., 7(4), 2008.
[17]
J. Regehr, A. Reid, and K. Webb. Eliminating stack overflow by abstract interpretation. ACM Trans. Embedded Comput. Syst., 4(4):751--778, 2005.
[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.
[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.
[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.
[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.
[22]
Systronix. A practical engineering approach to using embedded java in real-world applications. http://www.systronix.com/book/benchmark/benchmark.html.
[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.
[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.
[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.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

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
  • 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
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 June 2012

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. JVM
  2. Java Virtual Machine
  3. TakaTuka
  4. call stack
  5. memory management
  6. wireless sensor networks

Qualifiers

  • Research-article

Conference

LCTES '12

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 268
    Total Downloads
  • Downloads (Last 12 months)5
  • Downloads (Last 6 weeks)0
Reflects downloads up to 18 Nov 2024

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media