skip to main content
10.1145/1064979.1064989acmconferencesArticle/Chapter ViewAbstractPublication PagesveeConference Proceedingsconference-collections
Article

Using page residency to balance tradeoffs in tracing garbage collection

Published:11 June 2005Publication History

ABSTRACT

We introduce an extension of mostly copying collection that uses page residency to determine when to relocate objects. Our collector promotes pages with high residency in place, avoiding unnecessary work and wasted space. It predicts the residency of each page, but when its predictions prove to be inaccurate, our collector reclaims unoccupied space by using it to satisfy allocation requests.Using residency allows our collector to dynamically balance the tradeoffs of copying and non-copying collection. Our technique requires less space than a pure copying collector and supports object pinning without otherwise sacrificing the ability to relocate objects.Unlike other hybrids, our collector does not depend on application-specific configuration and can quickly respond to changing application behavior. Our measurements show that our hybrid performs well under a variety of conditions; it prefers copying collection when there is ample heap space but falls back on non-copying collection when space becomes limited.

References

  1. D. F. Bacon, P. Cheng, and V. T. Rajan. Controlling fragmentation and space consumption in the metronome, a real-time garbage collector for java. In LCTES '03: Proceedings of the 2003 ACM SIGPLAN conference on Language, compiler, and tool for embedded systems, pages 81--92. ACM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. D. F. Bacon, P. Cheng, and V. T. Rajan. A real-time garbage collector with low overhead and consistent utilization. In Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 285--298. ACM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. F. Bartlett. Compacting garbage collection with ambiguous roots. Technical Report 88/2, DEC Western Research Laboratory, February 1988.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. F. Bartlett. A generational compacting garbage collector for C++. In ECOOP/OOPSLA Workshop on Garbage Collection in Object-Oriented Systems, Ottawa, Canada, 1990.Google ScholarGoogle Scholar
  5. S. M. Blackburn, S. Singhai, M. Hertz, K. S. McKinely, and J. E. B. Moss. Pretenuring for java. In Proceedings of the 16th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 342--352. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. G. E. Blelloch and P. Cheng. On bounding time and space for multiprocessor garbage collection. In Proceedings of the ACM SIGPLAN '99 Conference on Programming Language Design and Implementation PLDI, pages 104--117. ACM Press, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. H.-J. Boehm and M. Weiser. Garbage collection in an uncooperative environment. Softw. Pract. Exper., 18(9):807--820, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. A. Brooks. Trading data space for reduced time and code space in real-time garbage collection on stock hardware. In Proceedings of the 1984 ACM Symposium on LISP and functional programming, pages 256--262. ACM Press, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. P. J. Caudill and A. Wirfs-Brock. A third generation smalltalk-80 implementation. In Conference proceedings on Object-oriented programming systems, languages and applications, pages 119--130. ACM Press, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Chakravarty et al. The Haskell 98 Foreign Function Interface 1.0. http://www.cse.unsw.edu.au/~Echak/haskell/ffi/. Last viewed April 14, 2005.Google ScholarGoogle Scholar
  11. C. J. Cheney. A nonrecursive list compacting algorithm. Commun. ACM, 13(11):677--678, 1970. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Cheng, R. Harper, and P. Lee. Generational stack collection and profile-driven pretenuring. In Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation (PLDI), pages 162--173. ACM Press, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. W. D. Clinger and L. T. Hansen. Generational garbage collection and the radioactive decay model. In PLDI '97: Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation, pages 97--108. ACM Press, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Detlefs. GCOld: a benchmark to stress old-generation collection. http://www.experimentalstuff.com/Technologies/. Last viewed April 14, 2005.Google ScholarGoogle Scholar
  15. D. Detlefs, C. Flood, S. Heller, and T. Printezis. Garbage-first garbage collection. In ISMM '04: Proceedings of the 4th international symposium on Memory management, pages 37--48. ACM Press, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. E. W. Dijkstra, L. Lamport, A. J. Martin, C. S. Scholten, and E. F. M. Steffens. On-the-fly garbage collection: an exercise in cooperation. Commun. ACM, 21(11):966--975, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. R. R. Fenichel and J. C. Yochelson. A lisp garbage-collector for virtual-memory computer systems. Commun. ACM, 12(11):611--612, 1969. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. B. Hayes. Using key object opportunism to collect old objects. In OOPSLA '91: Conference proceedings on Object-oriented programming systems, languages, and applications, pages 33--46. ACM Press, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. Hejlsberg, S. Wiltamuth, and P. Golde. The C# Programming Language. Addison-Wesley, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Jones and R. Lins. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. John Wiley & Sons, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. B. Lang and F. Dupont. Incremental incrementally compacting garbage collection. In SIGPLAN '87: Papers of the Symposium on Interpreters and interpretive techniques, pages 253--263, New York, NY, USA, 1987. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. H. Lieberman and C. Hewitt. A real-time garbage collector based on the lifetimes of objects. Communications of the ACM, 26(6):419--429, June 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. L. McCarthy. Recursive functions of symbolic expressions and their computation by machine, part i. Communications of the ACM, 3(4):184--195, 1960. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. S. Nettles, J. O'Toole, and D. Pierce. Replication-based incremental copying collection. In Proceedings of the International Workshop on Memory Management, pages 357--364. Springer-Verlag, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. N. Sachindran and J. E. B. Moss. Mark-copy: fast copying gc with less space overhead. In Proceedings of the 18th ACM SIGPLAN conference on Object-Oriented Programing, Systems, Languages, and Applications, pages 326--343. ACM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. F. Smith and G. Morrisett. Comparing mostly-copying and mark-sweep conservative collection. ACM SIG-PLAN Notices, 34(3):68--78, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Sun Microsystems, Inc. JNI - Java Native Interface. http://java.sun.com/j2se/1.4.1/docs/guide/jni/. Last viewed April 14, 2005.Google ScholarGoogle Scholar
  28. D. Ungar. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. In Proceedings of the first ACM SIGSOFT/SIGPLAN software engineering symposium on Practical software development environments, pages 157--167. ACM Press, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. D. Ungar and F. Jackson. Tenuring policies for generation-based storage reclamation. In Conference proceedings on Object-oriented programming systems, languages and applications, pages 1--17. ACM Press, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Using page residency to balance tradeoffs in tracing garbage collection

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      VEE '05: Proceedings of the 1st ACM/USENIX international conference on Virtual execution environments
      June 2005
      216 pages
      ISBN:1595930477
      DOI:10.1145/1064979

      Copyright © 2005 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 11 June 2005

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate80of235submissions,34%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader