skip to main content
10.1145/2070942.2070973acmconferencesArticle/Chapter ViewAbstractPublication PagessensysConference Proceedingsconference-collections
research-article

Offline GC: trashing reachable objects on tiny devices

Published: 01 November 2011 Publication History

Abstract

The 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 by their battery life. We propose a garbage collection (GC) scheme called Offline GC which alleviates both these limitations. Our approach defies the current practice in which an object may be deallocated only if it is unreachable. Offline GC allows freeing an object that is still reachable but is guaranteed not to be used again in the program. Furthermore, it may deallocate an object inside a function, a loop or a block where it is last used, even if that object is assigned to a global field. This leads to a larger amount of memory available to a program.
Based on an inter-procedural and field-sensitive data flow analysis we identify, during program compilation, the point at which an object can safely be deallocated at runtime. We have designed three algorithms for the purpose of making these offline deallocation decisions. Our implementation of Offline GC indicates a significant reduction in the amount of RAM and the number of CPU cycles needed to run a variety of benchmark programs. Offline GC is shown to increase the average amount of RAM available to a program by up to 82% compared to a typical online garbage collector. Furthermore, the number of CPU cycles consumed in freeing the memory is reduced by up to 94% when Offline GC is used.

Supplementary Material

JPG File (systems_2.jpg)
MP4 File (systems_2.mp4)

References

[1]
ETH Zurich. The Sensor Network Museum. http://www.snm.ethz.ch/Main/HomePage, {Last Accessed: 15.08.2011}.
[2]
Niels Brouwers, Koen Langendoen, and Peter 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.
[3]
Faisal Aslam, Luminous Fennell, Christian Schindelhauer, Peter Thiemann, Gidon Ernst, Elmar Haussmann, Stefan Rührup, and Zastash Afzal 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]
Janice J. Heiss. Sentilla's Pervasive Computing -- The Universe Is the Computer. 2008 JavaOne Conference.
[5]
Richard Jones and Rafael Lins. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. John Wiley & Sons, September 1996.
[6]
Sigmund Cherem and Radu Rugina. Uniqueness Inference for Compile-Time Object Deallocation. In Proceedings of the 6th international symposium on Memory management, ISMM '07, pages 117--128, New York, NY, USA, 2007. ACM.
[7]
Samuel Guyer, Kathryn McKinley, and Daniel Frampton. Free-Me: A Static Analysis for Automatic Individual Object Reclamation. In Proceedings of the 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '06, pages 364--375, New York, NY, USA, 2006. ACM.
[8]
Elvira Albert, Samir Genaim, and Miguel Gomez-Zamalloa. Heap Space Analysis for Java Bytecode. In Proceedings of the 6th International Symposium on Memory Management, ISMM '07, pages 105--116, New York, NY, USA, 2007. ACM.
[9]
Jong-Deok Choi, Manish Gupta, Mauricio Serrano, Vugranam C. Sreedhar, and Sam Midkiff. Escape Analysis for Java. In Proceedings of the 14th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA '99, pages 1--19, New York, NY, USA, 1999. ACM.
[10]
Bruno Blanchet. Escape Analysis for Java#8482;: Theory and Practice. ACM Transactions on Programming Languages and Systems (TOPLAS), 25:713--775, November 2003.
[11]
Tim Lindholm and Frank Yellin. Java Virtual Machine Specification. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2nd edition, 1999.
[12]
Source code. GCBench and GCOld benchmarks. http://www.cs.cmu.edu/~spoons/gc/benchmarks.html, {Last Accessed: 15.08.2011}.
[13]
Omprakash Gnawali, Rodrigo Fonseca, Kyle Jamieson, David Moss, and Philip Levis. Collection Tree Protocol. In Proceedings of the 7th ACM Conference on Embedded Networked Sensor Systems, SenSys '09, pages 1--14. ACM, 2009.
[14]
Ian Chakeres and Charles Perkins. Dynamic MANET On-demand (DYMO) Routing. IETF (work in progress), 2010.
[15]
David Bacon, Perry Cheng, and David Grove. Garbage Collection for Embedded Systems. In Proceedings of the 4th ACM International Conference on Embedded Software, EM-SOFT '04, pages 125--136, New York, NY, USA, 2004. ACM.
[16]
Kumar Shiv, Kingsum Chow, Yanping Wang, and Dmitry Petrochenko. SPECjvm2008 Performance Characterization. In Proceedings of the 2009 SPEC Benchmark Workshop on Computer Performance Evaluation and Benchmarking, pages 17--35, Berlin, Heidelberg, 2009. Springer-Verlag.
[17]
Daniel Spoonhower, Guy Blelloch, and Robert 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.
[18]
Crossbow Technology. Wireless Sensor Networks. http://www.xbow.com, {Last Accessed: 15.02.2011}.
[19]
Ben Lawrence Titzer, Daniel Lee, and Jens Palsberg. Avrora: Scalable Sensor Network Simulation with Precise Timing. In Proceedings of the 4th International Symposium on Information Processing in Sensor Networks, IPSN '05, Piscataway, NJ, USA, 2005. IEEE Press.
[20]
Luminous Fennell. Garbage Collection for TakaTuka, Bachelors Thesis. University of Freiburg, Germany, 2010.
[21]
Jeffrey Barth. Shifting Garbage Collection Overhead to Compile Time. Communications of the ACM (CACM), 20:513--518, July 1977.
[22]
Pramod Joisha. Overlooking Roots: A Framework for Making Nondeferred Reference-Counting Garbage Collection Fast. In Proceedings of the 6th International Symposium on Memory Management, ISMM '07, pages 141--158, New York, NY, USA, 2007. ACM.
[23]
Wolfram Schulte. Deriving Residual Reference Count Garbage Collectors. In Symposium on Programming Language Implementation and Logic Programming (PLILP), pages 102--116. Springer-Verlag, 1994.
[24]
Ran Shaham, Eran Yahav, Elliot Kolodner, and Mooly Sagiv. Establishing Local Temporal Heap Safety Properties with Applications to Compile-Time Memory Management. In Static Analysis, volume 2694 of Lecture Notes in Computer Science, pages 483--503. Springer Berlin/Heidelberg, 2003.
[25]
Ole Agesen, David Detlefs, and J. Eliot Moss. Garbage collection and local variable type-precision and liveness in Java virtual machines. In Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation, PLDI '98, pages 269--279, New York, NY, USA, 1998. ACM.
[26]
Sigmund Cherem and Radu Rugina. Compile-Time Deallocation of Individual Objects. In Proceedings of the 5th International Symposium on Memory Management, ISMM '06, pages 138--149, New York, NY, USA, 2006. ACM.
[27]
Dan Grossman, Greg Morrisett, Trevor Jim, Michael Hicks, Yanling Wang, and James Cheney. Region-Based Memory Management in Cyclone. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, PLDI '02, pages 282--293, New York, NY, USA, 2002. ACM.
[28]
Neil Jones and Steven Muchnick. Flow Analysis and Optimization of LISP-like Structures. In Proceedings of the 6th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, POPL '79, pages 244--256, New York, NY, USA, 1979. ACM.
[29]
Alexandru Stefan, Florin Craciun, and Wei-Ngan Chin. A Flow-Sensitive Region Inference for CLI. In Proceedings of the 6th Asian Symposium on Programming Languages and Systems, APLAS '08, pages 19--35, Berlin, Heidelberg, 2008. Springer-Verlag.
[30]
Sigmund Cherem and Radu Rugina. Region Analysis and Transformation for Java Programs. In Proceedings of the 4th International Symposium on Memory Management, ISMM '04, pages 85--96, New York, NY, USA, 2004. ACM.
[31]
David Gay and Alex Aiken. Memory Management with Explicit Regions. In Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation, PLDI '98, pages 313--323, New York, NY, USA, 1998. ACM.

Cited By

View all
  • (2012)Rethinking Java call stack design for tiny embedded devicesACM SIGPLAN Notices10.1145/2345141.224842047:5(1-10)Online publication date: 12-Jun-2012
  • (2012)Rethinking Java call stack design for tiny embedded devicesProceedings of the 13th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, Tools and Theory for Embedded Systems10.1145/2248418.2248420(1-10)Online publication date: 12-Jun-2012

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SenSys '11: Proceedings of the 9th ACM Conference on Embedded Networked Sensor Systems
November 2011
452 pages
ISBN:9781450307185
DOI:10.1145/2070942
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: 01 November 2011

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. JVM
  2. Java virtual machine
  3. TakaTuka
  4. grabage collection
  5. offline memory management
  6. sensor networks

Qualifiers

  • Research-article

Conference

Acceptance Rates

Overall Acceptance Rate 174 of 867 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)0
Reflects downloads up to 17 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2012)Rethinking Java call stack design for tiny embedded devicesACM SIGPLAN Notices10.1145/2345141.224842047:5(1-10)Online publication date: 12-Jun-2012
  • (2012)Rethinking Java call stack design for tiny embedded devicesProceedings of the 13th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, Tools and Theory for Embedded Systems10.1145/2248418.2248420(1-10)Online publication date: 12-Jun-2012

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