skip to main content
research-article

Handles revisited: optimising performance and memory costs in a real-time collector

Published:04 June 2011Publication History
Skip Abstract Section

Abstract

Compacting garbage collectors must update all references to objects they move. Updating is a lengthy operation but the updates must be transparent to the mutator. The consequence is that no space can be reclaimed until all references have been updated which, in a real-time collector, must be done incrementally. One solution is to replace direct references to objects with handles. Handles offer several advantages to a real-time collector. They eliminate the updating problem. They allow immediate reuse of the space used by evacuated objects. They incur no copy reserve overhead. However, the execution time overhead of handles has led to them being abandoned by most modern systems.

We re-examine this decision in the context of real-time garbage collection, for which several systems with handles have appeared recently. We provide the first thorough study of the overheads of handles, based on an optimised implementation of different handle designs within Ovm's Minuteman real-time collector. We find that with a good set of optimisations handles are not very expensive. We obtained zero overhead over the widely used Brooks-style compacting collector (1.6% and 3.1% on two other platforms) and 9% increase in memory usage. Our optimisations are particularly applicable to mark-compact collectors, but may also be useful to other collectors.

References

  1. O. Agesen. Space and time-efficient hashing of garbage-collected objects. Theor. Pract. Object Syst., 5: 119--124, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Armbruster, J. Baker, et al. A real-time Java virtual machine with applications in avionics. Trans. Embedded Comput. Sys., 7(1), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. D. F. Bacon, P. Cheng, and V. Rajan. A real-time garbage collector with low overhead and consistent utilization. In Principles of Programming Languages, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. Bendersky and E. Petrank. Space overhead bounds for dynamic memory management with partial compaction. In Principles of Programming Languages, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Blackburn and K. McKinley. Immix garbage collection: Mutator locality, fast collection, and space efficiency. In Programming Language Design and Implementation, 2008.Google ScholarGoogle Scholar
  6. et al.}blac06S. Blackburn, R. Garner, et al. The DaCapo benchmarks: Java benchmarking development and analysis. In Object-Oriented Programming, Systems, Languages, and Applications, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. G. Bollella, T. Canham, et al. Programming with non-heap memory in the real-time specification for Java. In Object-Oriented Programming, Systems, Languages, and Applications, 2003. 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 Lisp and Functional Programming, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. E. J. Bruno and G. Bollella. Real-Time Java Programming with Java RTS. Prentice Hall, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. G. Chen, M. Kandemir, et al. Heap compression for memory-constrained Java environments. In Object-Oriented Programming, Systems, Languages, and Applications, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Click, G. Tene, and M. Wolf. The Pauseless GC algorithm. In Virtual Execution Environments, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. S. Craciunas, C. M. Kirsch, et al. A compacting real-time memory management system. In USENIX, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. E. W. Dijkstra, L. Lamport, et al. On-the-fly garbage collection: An exercise in cooperation. Communications of the ACM, 21(11). 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. F. Gruian and Z. Salcic. Designing a concurrent hardware garbage collector for small embedded systems. In Asia-Pacific Computer Systems Architecture Conference, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. B. Hayes. Using key object opportunism to collect old objects. In Object-Oriented Programming, Systems, Languages, and Applications, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R. Henriksson. Scheduling Garbage Collection in Embedded Systems. PhD thesis, Lund University, 1998.Google ScholarGoogle Scholar
  17. C.-H. A. Hsieh, M. T. Conte, et al. Optimizing NET compilers for improved Java performance. Computer, 30, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Y. C. Hu, W. Yu, et al. Run-time support for distributed sharing in safe languages. Trans. Comput. Syst., 21, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. L. Hudson and J. E. B. Moss. Sapphire: copying garbage collection without stopping the world. Concurrency and Computation: Practice and Experience, 15(3--5), 2003.Google ScholarGoogle Scholar
  20. R. E. Jones and R. Lins. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. Wiley, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. T. Kalibera. Replicating real-time garbage collector for Java. In Java Technologies for Real-Time and Embedded Systems, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. H. Kermany and E. Petrank. The Compressor: Concurrent, incremental and parallel compaction. In Programming Language Design and Implementation, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Kirkup. Taking out the trash: Garbage collection, 2005. http://us.blackberry.com/devjournals/resources/journals/jan_2005/garbag_collection.jsp.Google ScholarGoogle Scholar
  24. G. Krasner, editor. Smalltalk-80: Bits of History, Words of Advice. Addison-Wesley, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Larose and M. Feeley. A compacting incremental collector and its performance in a production quality compiler. In International Symposium on Memory Management, 1998 Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. D. J. Lilja. Measuring Computer Performance: A Practitioner's Guide. Cambridge University Press, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. C.-M. Lin and T.-F. Chen. Dynamic memory management for real-time embedded Java chips. Real-Time Computing Systems and Applications, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. S. Meloan. The Java HotSpot performance engine: An in-depth look. http://developer.java.sun.com/developer/technicalArticles/Networking/HotSpot/.Google ScholarGoogle Scholar
  29. S. Nettles and J. O'Toole. Real-time replication garbage collection. In Programming Language Design and Implementation, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. K. Nilsen. Differentiating features of the PERC virtual machine. http://www.aonix.com/pdf/PERCWhitePaper_e.pdf, 2009.Google ScholarGoogle Scholar
  31. S. C. North and J. H. Reppy. Concurrent garbage collection on stock hardware. In Functional Programming and Computer Architecture, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Ovm. The Ovm virtual machine. http://www.ovmj.net.Google ScholarGoogle Scholar
  33. S. L. Peyton Jones and R. Jones, editors. International Symposium on Memory Management, 1998.Google ScholarGoogle Scholar
  34. P. P. Pirinen. Barrier techniques for incremental tracing. In International Symposium on Memory Management, 1998 Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. F. Pizlo, L. Ziarek, et al. Schism: fragmentation-tolerant real-time garbage collection. In Programming Language Design and Implementation, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. M. Schoeberl. Scheduling of hard real-time garbage collection. Real-Time Systems, 45(3), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. M. Schoeberl, C. Thalinger, et al. Hardware objects for Java. In International Symposium on Object-Oriented Real-Time Distributed Computing, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. F. Siebert. Realtime garbage collection in the JamaicaVM 3.0. In Java Technologies for Real-time and Embedded Systems, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. S. Stanchina and M. Meyer. Mark-sweep or copying? a "best of both worlds" algorithm and a hardware-supported real-time implementation. In International Symposium on Memory Management, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. T. Yuasa. Real-time garbage collection on general-purpose machines. J. Systems and Software, 11(3), 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Handles revisited: optimising performance and memory costs in a real-time collector

      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

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 46, Issue 11
        ISMM '11
        November 2011
        135 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2076022
        Issue’s Table of Contents
        • cover image ACM Conferences
          ISMM '11: Proceedings of the international symposium on Memory management
          June 2011
          148 pages
          ISBN:9781450302630
          DOI:10.1145/1993478

        Copyright © 2011 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 4 June 2011

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!