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.
- O. Agesen. Space and time-efficient hashing of garbage-collected objects. Theor. Pract. Object Syst., 5: 119--124, 1999. Google Scholar
Digital Library
- A. Armbruster, J. Baker, et al. A real-time Java virtual machine with applications in avionics. Trans. Embedded Comput. Sys., 7(1), 2007. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- A. Bendersky and E. Petrank. Space overhead bounds for dynamic memory management with partial compaction. In Principles of Programming Languages, 2011. Google Scholar
Digital Library
- S. Blackburn and K. McKinley. Immix garbage collection: Mutator locality, fast collection, and space efficiency. In Programming Language Design and Implementation, 2008.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- E. J. Bruno and G. Bollella. Real-Time Java Programming with Java RTS. Prentice Hall, 2009. Google Scholar
Digital Library
- G. Chen, M. Kandemir, et al. Heap compression for memory-constrained Java environments. In Object-Oriented Programming, Systems, Languages, and Applications, 2003. Google Scholar
Digital Library
- C. Click, G. Tene, and M. Wolf. The Pauseless GC algorithm. In Virtual Execution Environments, 2005. Google Scholar
Digital Library
- S. S. Craciunas, C. M. Kirsch, et al. A compacting real-time memory management system. In USENIX, 2008. Google Scholar
Digital Library
- E. W. Dijkstra, L. Lamport, et al. On-the-fly garbage collection: An exercise in cooperation. Communications of the ACM, 21(11). 1978. Google Scholar
Digital Library
- F. Gruian and Z. Salcic. Designing a concurrent hardware garbage collector for small embedded systems. In Asia-Pacific Computer Systems Architecture Conference, 2005. Google Scholar
Digital Library
- B. Hayes. Using key object opportunism to collect old objects. In Object-Oriented Programming, Systems, Languages, and Applications, 1991. Google Scholar
Digital Library
- R. Henriksson. Scheduling Garbage Collection in Embedded Systems. PhD thesis, Lund University, 1998.Google Scholar
- C.-H. A. Hsieh, M. T. Conte, et al. Optimizing NET compilers for improved Java performance. Computer, 30, 1997. Google Scholar
Digital Library
- Y. C. Hu, W. Yu, et al. Run-time support for distributed sharing in safe languages. Trans. Comput. Syst., 21, 2003. Google Scholar
Digital Library
- 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 Scholar
- R. E. Jones and R. Lins. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. Wiley, 1996. Google Scholar
Digital Library
- T. Kalibera. Replicating real-time garbage collector for Java. In Java Technologies for Real-Time and Embedded Systems, 2009. Google Scholar
Digital Library
- H. Kermany and E. Petrank. The Compressor: Concurrent, incremental and parallel compaction. In Programming Language Design and Implementation, 2006. Google Scholar
Digital Library
- M. Kirkup. Taking out the trash: Garbage collection, 2005. http://us.blackberry.com/devjournals/resources/journals/jan_2005/garbag_collection.jsp.Google Scholar
- G. Krasner, editor. Smalltalk-80: Bits of History, Words of Advice. Addison-Wesley, 1983. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- D. J. Lilja. Measuring Computer Performance: A Practitioner's Guide. Cambridge University Press, 2000. Google Scholar
Digital Library
- C.-M. Lin and T.-F. Chen. Dynamic memory management for real-time embedded Java chips. Real-Time Computing Systems and Applications, 2000. Google Scholar
Digital Library
- S. Meloan. The Java HotSpot performance engine: An in-depth look. http://developer.java.sun.com/developer/technicalArticles/Networking/HotSpot/.Google Scholar
- S. Nettles and J. O'Toole. Real-time replication garbage collection. In Programming Language Design and Implementation, 1993. Google Scholar
Digital Library
- K. Nilsen. Differentiating features of the PERC virtual machine. http://www.aonix.com/pdf/PERCWhitePaper_e.pdf, 2009.Google Scholar
- S. C. North and J. H. Reppy. Concurrent garbage collection on stock hardware. In Functional Programming and Computer Architecture, 1987. Google Scholar
Digital Library
- Ovm. The Ovm virtual machine. http://www.ovmj.net.Google Scholar
- S. L. Peyton Jones and R. Jones, editors. International Symposium on Memory Management, 1998.Google Scholar
- P. P. Pirinen. Barrier techniques for incremental tracing. In International Symposium on Memory Management, 1998 Google Scholar
Digital Library
- F. Pizlo, L. Ziarek, et al. Schism: fragmentation-tolerant real-time garbage collection. In Programming Language Design and Implementation, 2010. Google Scholar
Digital Library
- M. Schoeberl. Scheduling of hard real-time garbage collection. Real-Time Systems, 45(3), 2010. Google Scholar
Digital Library
- M. Schoeberl, C. Thalinger, et al. Hardware objects for Java. In International Symposium on Object-Oriented Real-Time Distributed Computing, 2008. Google Scholar
Digital Library
- F. Siebert. Realtime garbage collection in the JamaicaVM 3.0. In Java Technologies for Real-time and Embedded Systems, 2007. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- T. Yuasa. Real-time garbage collection on general-purpose machines. J. Systems and Software, 11(3), 1990. Google Scholar
Digital Library
Index Terms
Handles revisited: optimising performance and memory costs in a real-time collector
Recommendations
Handles revisited: optimising performance and memory costs in a real-time collector
ISMM '11: Proceedings of the international symposium on Memory managementCompacting 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 ...
Improved replication-based incremental garbage collection for embedded systems
ISMM '10We have developed an incremental compacting garbage collector for embedded Java systems. The collector divides the heap into equal sized pages and uses the segregated free lists for fast allocation. Collectors that have such a heap layout have a problem ...
Mark-sweep or copying?: a "best of both worlds" algorithm and a hardware-supported real-time implementation
ISMM '07: Proceedings of the 6th international symposium on Memory managementCopying collectors offer a number of advantages over their mark-sweep counterparts. First, they do not have to deal with mark stacks and potential mark stack overflows. Second, they do not suffer from unpredictable fragmentation overheads since they ...







Comments