Accurate garbage collection in uncooperative environments revisited

  • Authors:
  • J. Baker;A. Cunei;T. Kalibera;F. Pizlo;J. Vitek

  • Affiliations:
  • Department of Computer Science, Purdue University, 305 N. University Street, West Lafayette, IN 47907, U.S.A.;Department of Computer Science, Purdue University, 305 N. University Street, West Lafayette, IN 47907, U.S.A.;Department of Computer Science, Purdue University, 305 N. University Street, West Lafayette, IN 47907, U.S.A.;Department of Computer Science, Purdue University, 305 N. University Street, West Lafayette, IN 47907, U.S.A.;Department of Computer Science, Purdue University, 305 N. University Street, West Lafayette, IN 47907, U.S.A.

  • Venue:
  • Concurrency and Computation: Practice & Experience
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Implementing a concurrent programming language such as Java by means of a translator to an existing language is attractive as it provides portability over all platforms supported by the host language and reduces development time—as many low-level tasks can be delegated to the host compiler. The C and C++ programming languages are popular choices for many language implementations due to the availability of efficient compilers on a wide range of platforms. For garbage-collected languages, however, they are not a perfect match as no support is provided for accurately discovering pointers to heap-allocated data on thread stacks. We evaluate several previously published techniques and propose a new mechanism, lazy pointer stacks, for performing accurate garbage collection in such uncooperative environments. We implemented the new technique in the Ovm Java virtual machine with our own Java-to-C-C++ compiler using GCC as a back-end compiler. Our extensive experimental results confirm that lazy pointer stacks outperform existing approaches: we provide a speedup of 4.5% over Henderson's accurate collector with a 17% increase in code size. Accurate collection is essential in the context of real-time systems, we thus validate our approach with the implementation of a real-time concurrent garbage collection algorithm. Copyright © 2009 John Wiley & Sons, Ltd. A preliminary version of this work was presented at the 16th International Conference on Compiler Construction (CC 2007), part of the Joint European Conferences on Theory and Practice of Software (ETAPS 2007), March 26–30, 2007, Braga, Portugal.