Abstract
A reference-counting garbage collector cannot reclaim unreachable cyclic structures of objects. Therefore, reference-counting collectors either use a backup tracing collector infrequently, or employ a cycle collector to reclaim cyclic structures. We propose a new concurrent cycle collector, one that runs concurrently with the program threads, imposing negligible pauses (of around 1ms) on a multiprocessor.
Our new collector combines a state-of-the-art cycle collector [Bacon and Rajan 2001] with sliding-views collectors [Levanoni and Petrank 2001, 2006; Azatchi et al. 2003]. The use of sliding views for cycle collection yields two advantages. First, it drastically reduces the number of cycle candidates, which in turn drastically reduces the work required to record and trace these candidates. Consequentially, a large improvement in cycle collection efficiency is achieved. Second, it eliminates the theoretical termination problem that appeared in the earlier concurrent cycle collector. There, a rare race may delay the reclamation of an unreachable cyclic structure forever. The sliding-views cycle collector guarantees reclamation of all unreachable cyclic structures.
The proposed collector was implemented on the Jikes RVM and we provide measurements including a comparison between the use of backup tracing and the use of cycle collection with reference counting. To the best of our knowledge, such a comparison has not been reported before.
- Alpern, B., Attanasio, C. R., Cocchi, A., Lieber, D., Smith, S., Ngo, T., Barton, J. J., Hummel, S. F., Sheperd, J. C., and Mergen, M. 1999. Implementing Jalapeño in Java. In OOPSLA'99 ACM Conference on Object-Oriented Systems, Languages and Applications. ACM SIGPLAN Notices, vol. 34(10). ACM Press, Denver, CO, 314--324. Google Scholar
- Azatchi, H., Levanoni, Y., Paz, H., and Petrank, E. 2003. An on-the-fly mark and sweep garbage collector based on sliding view. OOPSLA'03 ACM Conference on Object-Oriented Systems, Languages, and Applications. ACM SIGPLAN Notices. ACM Press, Anaheim, CA. Google Scholar
- Azatchi, H. and Petrank, E. 2003. Integrating generations with advanced reference counting garbage collectors. In Proceedings of the Compiler Construction: 12th International Conference on Compiler Construction, CC 2003. Lecture Notes in Computer Science, vol. 2622. Springer-Verlag Heidelberg, Warsaw, Poland, 185--199. Google Scholar
- Bacon, D. F., Attanasio, C. R., Lee, H. B., Rajan, V. T., and Smith, S. 2001. Java without the coffee breaks: A nonintrusive multiprocessor garbage collector. In Proceedings of SIGPLAN 2001 Conference on Programming Languages Design and Implementation. ACM SIGPLAN Notices. ACM Press, Snowbird, Utah. Google Scholar
- Bacon, D. F. and Rajan, V. 2001. Concurrent cycle collection in reference counted systems. In Proceedings of the 15th European Conference on Object-Oriented Programming, ECOOP 2001, J. L. Knudsen, Ed. Lecture Notes in Computer Science, vol. 2072. Springer-Verlag, Budapest. Google Scholar
- Baker, H. G. 1978. List processing in real-time on a serial computer. Comm. ACM 21, 4, 280-- 294. Google Scholar
- Ben-Ari, M. 1982. On-the-fly garbage collection: New algorithms inspired by program proofs. In Automata, Languages and Programming. Ninth Colloquium, M. Nielsen and E. M. Schmidt, Eds. Springer-Verlag, Aarhus, Denmark, 14--22. Google Scholar
- Ben-Ari, M. 1984. Algorithms for on-the-fly garbage collection. ACM Trans. Program. Lang. Syst. 6, 3 (July), 333--344. Google Scholar
- Blackburn, S. M. and McKinley, K. S. 2003. Ulterior reference counting: Fast garbage collection without a long wait. OOPSLA'03 ACM Conference on Object-Oriented Systems, Languages, and Applications. ACM SIGPLAN Notices. ACM Press, Anaheim, CA. Google Scholar
- Bobrow, D. G. 1980. Managing re-entrant structures using reference counts. ACM Trans. Program. Lang. Syst. 2, 3 (July), 269--273. Google Scholar
- Boehm, H.-J., Demers, A. J., and Shenker, S. 1991. Mostly parallel garbage collection. ACM SIGPLAN Notices 26, 6, 157--164. Google Scholar
- Christopher, T. W. 1984. Reference count garbage collection. Software Practice and Experience 14, 6 (June), 503--507.Google Scholar
- Collins, G. E. 1960. A method for overlapping and erasure of lists. Comm. ACM 3, 12 (Dec.), 655--657. Google Scholar
- Demers, A., Weiser, M., Hayes, B., Boehm, H.-J., Bobrow, D. G., and Shenker, S. 1990. Combining generational and conservative garbage collection: Framework and implementations. In Conference Record of the Seventeenth Annual ACM Symposium on Principles of Programming Languages. ACM SIGPLAN Notices. ACM Press, San Francisco, CA, 261--269. Google Scholar
- Deutsch, L. P. and Bobrow, D. G. 1976. An efficient incremental automatic garbage collector. Comm. ACM 19, 9 (Sept.), 522--526. Google Scholar
- Dijkstra, E. W., Lamport, L., Martin, A. J., Scholten, C. S., and Steffens, E. F. M. 1978. On-the-fly garbage collection: An exercise in cooperation. Comm. ACM 21, 11 (Nov.), 965--975. Google Scholar
- Doligez, D. and Gonthier, G. 1994. Portable, unobtrusive garbage collection for multiprocessor systems. In Conference Record of the Twenty-first Annual ACM Symposium on Principles of Programming Languages. ACM SIGPLAN Notices. ACM Press, Portland, OR. Google Scholar
- Doligez, D. and Leroy, X. 1993. A concurrent generational garbage collector for a multi-threaded implementation of ML. In Conference Record of the Twentieth Annual ACM Symposium on Principles of Programming Languages. ACM SIGPLAN Notices. ACM Press, 113--123. Google Scholar
- Domani, T., Kolodner, E., and Petrank, E. 2000. A generational on-the-fly garbage collector for Java. In Proceedings of SIGPLAN 2000 Conference on Programming Languages Design and Implementation. ACM SIGPLAN Notices. ACM Press, Vancouver. Google Scholar
- Ellis, J. R., Li, K., and Appel, A. W. 1988. Real-time concurrent collection on stock multiprocessors. Tech. Rep. DEC--SRC--TR--25, DEC Systems Research Center, Palo Alto, CA. Feb.Google Scholar
- Endo, T., Taura, K., and Yonezawa, A. 1997. A scalable mark-sweep garbage collector on large-scale shared-memory machines. In Proceedings of High Performance Computing and Networking (SC'97). Google Scholar
- Flood, C., Detlefs, D., Shavit, N., and Zhang, C. 2001. Parallel garbage collection for shared memory multiprocessors. In Usenix Java Virtual Machine Research and Technology Symposium (JVM '01). Monterey, CA. Google Scholar
- Gries, D. 1977. An exercise in proving parallel programs correct. Comm. ACM 20, 12 (Dec.), 921--930. Google Scholar
- Hudson, R. L. and Moss, J. E. B. 2001. Sapphire: Copying GC without stopping the world. In Joint ACM Java Grande---ISCOPE 2001 Conference. Stanford University, CA. Google Scholar
- Jones, R. E. 1996. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. Wiley, Chichester. Google Scholar
- Kermany, H. and Petrank, E. 2006. The compressor: Concurrent, incremental, and parallel compaction. In Proceedings of SIGPLAN 2006 Conference on Programming Languages Design and Implementation. ACM SIGPLAN Notices. ACM Press, Ottawa, Canada. Google Scholar
- Kolodner, E. K. and Petrank, E. 2004. Parallel copying garbage collection using delayed allocation. In Parallel Processing Letters. Vol. 14.Google Scholar
- Kung, H. T. and Song, S. W. 1977. An efficient parallel garbage collection system and its correctness proof. In IEEE Symposium on Foundations of Computer Science. IEEE Press, 120--131.Google Scholar
- Lamport, L. 1976. Garbage collection with multiple processes: an exercise in parallelism. In Proceedings of the 1976 International Conference on Parallel Processing. 50--54.Google Scholar
- Levanoni, Y. and Petrank, E. 1999. A scalable reference counting garbage collector. Tech. Rep. CS--0967, Technion---Israel Institute of Technology, Haifa, Israel. (Nov).Google Scholar
- Levanoni, Y. and Petrank, E. 2001. An on-the-fly reference counting garbage collector for Java. In OOPSLA'01 ACM Conference on Object-Oriented Systems, Languages and Applications. ACM SIGPLAN Notices, vol. 36(10). ACM Press, Tampa, FL. Google Scholar
- Levanoni, Y. and Petrank, E. 2006. An on-the-fly reference-counting garbage collector for Java. ACM Transactions on Programming Languages and Systems 28, 1 (Jan.), 1--69. Google Scholar
- Lins, R. D. 1992. Cyclic reference counting with lazy mark-scan. Information Processing Letters 44, 4, 215--220. Also Computing Laboratory Technical Report 75, University of Kent, July 1990. Google Scholar
- Lins, R. D. 2002. An efficient algorithm for cyclic reference counting. Information Processing Letters 83, 145--150. Google Scholar
- Martinez, A. D., Wachenchauzer, R., and Lins, R. D. 1990. Cyclic reference counting with local mark-scan. Information Processing Letters 34, 31--35. Google Scholar
- McBeth, J. H. 1963. On the reference counter method. Communications of the ACM 6, 9 (Sept.), 575. Google Scholar
- Moon, D. A. 1984. Garbage collection in a large LISP system. In Conference Record of the 1984 ACM Symposium on Lisp and Functional Programming, G. L. Steele, Ed. ACM Press, Austin, TX, 235--245. Google Scholar
- Nilsen, K. D., Mitra, S., and Lee, S. J. 2000. Method for efficient soft real-time execution of portable byte code computer programs. http://www.patentstorm.us/patents/6081665.html.Google Scholar
- Paz, H., Petrank, E., Bacon, D. F., Rajan, V., and Kolodner, E. K. 2005a. An efficient on-the-fly cycle collection. In Proceedings of the 14th International Conference on Compiler Construction. Springer-Verlag, Edinburgh. Google Scholar
- Paz, H., Petrank, E., and Blackburn, S. M. 2003. Age-oriented garbage collection. Tech. Rep. CS-2003-08, Technion, Israel Institute of Technology. Oct. http://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-info.cgi?2003/CS/CS-2003-08.Google Scholar
- Paz, H., Petrank, E., and Blackburn, S. M. 2005b. Age-oriented garbage collection. In Proceedings of the 14th International Conference on Compiler Construction. Springer-Verlag, Edinburgh.Google Scholar
- Printezis, T. and Detlefs, D. 2000. A generational mostly-concurrent garbage collector. In ISMM 2000 Proceedings of the Second International Symposium on Memory Management, T. Hosking, Ed. ACM SIGPLAN Notices, vol. 36(1). ACM Press, Minneapolis, MN. Google Scholar
- SPEC Benchmarks. 2000. Standard Performance Evaluation Corporation. http://www.spec.org/.Google Scholar
- Steele, G. L. 1975. Multiprocessing compactifying garbage collection. Comm. ACM 18, 9 (Sept.), 495--508. Google Scholar
- Steele, G. L. 1976. Corrigendum: Multiprocessing compactifying garbage collection. Comm. ACM 19, 6 (June), 354. Google Scholar
- Weizenbaum, J. 1963. Symmetric list processor. Comm. ACM 6, 9 (Sept.), 524--544. Google Scholar
- Wilson, P. R., Johnstone, M. S., Neely, M., and Boles, D. 1995. Dynamic storage allocation: A survey and critical review. In Proceedings of International Workshop on Memory Management, H. Baker, Ed. Lecture Notes in Computer Science, vol. 986. Springer-Verlag, Kinross, Scotland. Google Scholar
Index Terms
An efficient on-the-fly cycle collection
Recommendations
A generational on-the-fly garbage collector for Java
PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementationAn on-the-fly garbage collector does not stop the program threads to perform the collection. Instead, the collector executes in a separate thread (or process) in parallel to the program. On-the-fly collectors are useful for multi-threaded applications ...
An on-the-fly mark and sweep garbage collector based on sliding views
Special Issue: Proceedings of the OOPSLA '03 conferenceWith concurrent and garbage collected languages like Java and C# becoming popular, the need for a suitable non-intrusive, efficient, and concurrent multiprocessor garbage collector has become acute. We propose a novel mark and sweep on-the-fly algorithm ...
A generational on-the-fly garbage collector for Java
An on-the-fly garbage collector does not stop the program threads to perform the collection. Instead, the collector executes in a separate thread (or process) in parallel to the program. On-the-fly collectors are useful for multi-threaded applications ...






Comments