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.
- AlgoWiKi: The Programmer's Compendium. http://algowiki.net/wiki/.Google Scholar
- Memsic: Wirless sensor networks. http://www.memsic.com/products/wireless-sensor-networks/.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- I. Chakeres and C. Perkins. Dynamic MANET On-demand (DYMO) Routing. IETF (work in progress), 2010.Google Scholar
- Y. Choi and H. Han. Optimal register reassignment for register stack overflow minimization. ACM Trans. Archit. Code Optim., 3(1):90--114, 2006. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- D. Gregg, M. A. Ertl, and A. Krall. A fast java interpreter. In In Proceedings of the Workshop on Java, 2001.Google Scholar
- Janice J. Heiss. Sentilla's Pervasive Computing -- The Universe Is the Computer. 2008 JavaOne Conference.Google Scholar
- 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 Scholar
Cross Ref
- T. Lindholm and F. Yellin. Java Virtual Machine Specification. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2nd edition, 1999. Google Scholar
Digital Library
- B. Middha, M. S. Simpson, and R. Barua. Mtss: Multitask stack sharing for embedded systems. ACM Trans. Embedded Comput. Syst., 7(4), 2008. Google Scholar
Digital Library
- J. Regehr, A. Reid, and K. Webb. Eliminating stack overflow by abstract interpretation. ACM Trans. Embedded Comput. Syst., 4(4):751--778, 2005. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Systronix. A practical engineering approach to using embedded java in real-world applications. http://www.systronix.com/book/benchmark/benchmark.html.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Rethinking Java call stack design for tiny embedded devices
Recommendations
Rethinking Java call stack design for tiny embedded devices
LCTES '12: Proceedings of the 13th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, Tools and Theory for Embedded SystemsThe 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 ...
Java™ on the bare metal of wireless sensor devices: the squawk Java virtual machine
VEE '06: Proceedings of the 2nd international conference on Virtual execution environmentsThe Squawk virtual machine is a small Java™ virtual machine (VM) written mostly in Java that runs without an operating system on a wireless sensor platform. Squawk translates standard class file into an internal pre-linked, position independent format ...
Offline GC: trashing reachable objects on tiny devices
SenSys '11: Proceedings of the 9th ACM Conference on Embedded Networked Sensor SystemsThe ability of tiny embedded devices to run large and feature-rich Java programs is typically constrained by the amount of memory installed on those devices. Furthermore, the useful operation of such devices in a wireless sensor application is limited ...






Comments