Garbage collection for embedded systems

Security concerns on embedded devices like cellular phones make Java an extremely attractive technology for providing third-party and user-downloadable functionality. However, garbage collectors have typically required several times the maximum live data set size (which is the minimum possible heap size) in order to run well. In addition, the size of the virtual machine (ROM) image and the size of the collector's data structures (metadata) have not been a concern for server- or workstation-oriented collectors.We have implemented two different collectors specifically designed to operate well on small embedded devices. We have also developed a number of algorithmic improvements and compression techniques that allow us to eliminate almost all of the per-object overhead that the virtual machine and the garbage collector require. We describe these optimizations and present measurements of the Java embedded benchmarks (EEMBC) of our implementations on both an IA32 laptop and an ARM-based PDA.For applications with low to moderate allocation rates, our optimized collector running on the ARM is able to achieve 85% of peak performance with only 1.05 to 1.3 times the absolute minimum heap size. For applications with high allocation rates, the collector achieves 85% of peak performance with 1.75 to 2.5 times the minimum heap size. The collector code takes up 40 KB of ROM, and collector metadata overhead has been almost completely eliminated, consuming only 0.4% of the heap.

[1]  David Gay,et al.  Memory management with explicit regions , 1998, PLDI.

[2]  Daniel G. Bobrow,et al.  A note on the efficiency of a LISP computation in a paged machine , 1968, CACM.

[3]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.

[4]  V. T. Rajan,et al.  A real-time garbage collector with low overhead and consistent utilization , 2003, POPL '03.

[5]  Paul R. Wilson,et al.  Non-compacting memory allocation and real-time garbage collection , 1997 .

[6]  Henry G. Baker,et al.  The treadmill: real-time garbage collection without motion sickness , 1992, SIGP.

[7]  Patrik Persson Live memory analysis for garbage collection in embedded systems , 1999, LCTES '99.

[8]  David F. Bacon,et al.  Controlling fragmentation and space consumption in the metronome, a real-time garbage collector for Java , 2003 .

[9]  Roger Henriksson,et al.  Scheduling Garbage Collection in Embedded Systems , 1998 .

[10]  Fridtjof Siebert,et al.  Eliminating external fragmentation in a non-moving garbage collector for Java , 2000, CASES '00.

[11]  Douglas T. Ross The AED free storage package , 1967, CACM.

[12]  Mauricio J. Serrano,et al.  Thin locks: featherweight synchronization for Java , 1998, PLDI '98.

[13]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[14]  David E. Culler,et al.  A Network-Centric Approach to Embedded Software for Tiny Devices , 2001, EMSOFT.

[15]  James Gosling,et al.  The Real-Time Specification for Java , 2000, Computer.

[16]  Peter Fritzson,et al.  Decreasing Memory Overhead in Hard Real-Time Garbage Collection , 2002, EMSOFT.

[17]  Daniel G. Bobrow,et al.  Structure of a LISP system using two-level storage , 1967, CACM.

[18]  Robert Fenichel,et al.  A LISP garbage-collector for virtual-memory computer systems , 1969, CACM.

[19]  David Ungar Generation scavenging: a nondisruptive high performance storage reclamation algorithm , 1984 .

[20]  Robert Virding A Garbage Collector for the Concurrent Real-Time Language Erlang , 1995, IWMM.

[21]  Jacques Cohen,et al.  Garbage Collection of Linked Data Structures , 1981, CSUR.

[22]  Krishna M. Kavi,et al.  Storage Allocation for Real-Time, Embedded Systems , 2001, EMSOFT.

[23]  D. Bobrow,et al.  THE PROGRAMMING LANGUAGE LISP: ITS OPERATION AND APPLICATIONS, , 1967 .

[24]  V. T. Rajan,et al.  Controlling fragmentation and space consumption in the metronome, a real-time garbage collector for Java , 2003, LCTES '03.

[25]  David M. Ungar,et al.  Generation Scavenging: A non-disruptive high performance storage reclamation algorithm , 1984, SDE 1.

[26]  Richard Jones,et al.  Garbage collection , 1996 .

[27]  Alexandru Nicolau,et al.  Comparison of Compacting Algorithms for Garbage Collection , 1983, TOPL.

[28]  Mahmut T. Kandemir,et al.  Tuning garbage collection for reducing memory system energy in an embedded java environment , 2002, TECS.

[29]  Wilfred J. Hansen,et al.  Compact list representation: definition, garbage collection, and system implementation , 1969, CACM.

[30]  Mads Tofte,et al.  Region-based Memory Management , 1997, Inf. Comput..

[31]  David F. Bacon,et al.  Space- and Time-Efficient Implementation of the Java Object Model , 2002, ECOOP.

[32]  Henry G. Baker,et al.  List processing in real time on a serial computer , 1978, CACM.

[33]  George E. Collins,et al.  A method for overlapping and erasure of lists , 1960, CACM.

[34]  Guy E. Blelloch,et al.  A parallel, real-time garbage collector , 2001, PLDI '01.

[35]  Chris J. Cheney A nonrecursive list compacting algorithm , 1970, Commun. ACM.

[36]  Narayanan Vijaykrishnan,et al.  Heap compression for memory-constrained Java environments , 2003, OOPSLA 2003.