Abstract
Automatic storage reclamation via reference counting has important advantages, but has always suffered from a major weakness due to its inability to reclaim cyclic data structures.
We describe a novel cycle collection algorithm that is both concurrent — it is capable of collecting garbage even in the presence of simultaneous mutation — and localized—it never needs to perform a global search of the entire data space. We describe our algorithm in detail and present a proof of correctness. We have implemented our algorithm in the Jalapeño Java virtual machine as part of the Recycler, a concurrent multiprocessor reference counting garbage collector that achieves maximum mutator pause times of only 6 milliseconds. We present measurements of the behavior of the cycle collection algorithm over a set of eight benchmarks that demonstrate the effectiveness of the algorithm at finding garbage cycles, handling concurrent mutation, and eliminating global tracing.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Alpern, B., ET AL. Implementing Jalañpeño in Java. In OOPSLA’99 Conference Proceedings: Object-Oriented Programming Systems, Languages, and Applications (Denver, Colorado, Oct. 1999). SIGPLAN Notices 34, 10, 314–324.
Appel, A.W., Ellis, J. R., and Li, K. Real-time concurrent collection on stock multiprocessors. In Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation (Atlanta, Georgia, June 1988). SIGPLAN Notices, 23, 7 (July), 11–20.
Bacon, D. F., Attanasio, C. R., Lee, H. B., Rajan, V. T., AND Smith, S. Java without the coffee breaks: A nonintrusive multiprocessor garbage collector. In Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation (Snowbird, Utah, June 2001). SIGPLAN Notices, 36, 5 (May).
Bacon, D. F., Kolodner, H., Nathaniel, R., Petrank, E., AND Rajan, V. T. Strongly-connected component algorithms for concurrent cycle collection. Tech. rep., IBM T.J. Watson Research Center and IBM Haifa Scientific Center, Apr. 2001.
Bobrow, D. G. Managing re-entrant structures using reference counts. ACM Trans. Program. Lang. Syst 2. , 3 (July 1980), 269–273.
Christopher, T. W. Reference count garbage collection. Software-Practice and Experience 14 , 6 (June 1984), 503–507.
Collins, G. E. A method for overlapping and erasure of lists. Commun. ACM 3, 12 (Dec. 1960), 655–657.
Detreville, J. Experience with concurrent garbage collectors for Modula-2+. Tech. Rep. 64, DEC Systems Research Center, Palo Alto, California, Aug. 1990.
Deutsch, L. P., AND Bobrow, D. G. An efficient incremental automatic garbage collector. Commun. ACM 19, 7 (July 1976), 522–526.
Dijkstra, E. W., Lamport, L., Martin, A. J., Scholten, C. S., AND Steffens, E. F. M. On-the-fly garbage collection: An exercise in cooperation. In Hierarchies and Interfaces, F. L. Bauer et al., Eds., vol. 46 of Lecture Notes in Computer Science. Springer-Verlag, New York, 1976, pp. 43–56.
Doligez, D., AND Leroy, X. A concurrent generational garbage collector for a multithreaded implementation of ML. In Conference Record of the Twentieth ACM Symposium on Principles of Programming Languages (Charleston, South Carolina, Jan. 1993), ACM Press, New York, New York, pp. 113–123.
Domani, T., ET AL. Implementing an on-the-fly garbage collector for Java. In Proceedings of the ACM SIGPLAN International Symposium on Memory Management (Minneapolis, MN, Oct. 2000). SIGPLAN Notices, 36, 1, 155–166.
Domani, T., Kolodner, E. K., AND Petrank, E. A generational on-the-fly garbage collector for Java. In Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation (June 2000). SIGPLAN Notices, 35, 6, 274–284.
Huelsbergen, L., AND Larus, J. R. A concurrent copying garbage collector for languages that distinguish (im)mutable data. In Proceedings of the Fourth ACM Symposium on Principles and Practice of Parallel Programming (May 1993). SIGPLAN Notices, 28, 7 (July), 73–82.
Huelsbergen, L., AND Winterbottom, P. Very concurrent mark-&-sweep garbage collection without fine-grain synchronization. In Proceedings of the ACM SIGPLAN International Symposium on Memory Management (Mar. 1999). SIGPLAN Notices, 34, 3, 166–174.
Jones, R. E., AND Lins, R. D. Cyclic weighted reference counting without delay. In PARLE’93 Parallel Architectures and Languages Europe (June 1993), A. Bode, M. Reeve, and G. Wolf, Eds., vol. 694 of Lecture Notes in Computer Science, Springer-Verlag, pp. 712–715.
Jones, R. E., AND Lins, R. D. Garbage Collection. John Wiley and Sons, 1996.
Kung, H. T., AND Song, S. W. An efficient parallel garbage collection system and its correctness proof. In IEEE Symposium on Foundations of Computer Science (1977), IEEE Press, New York, New York, pp. 120–131.
Lamport, L. Garbage collection with multiple processes: an exercise in parallelism. In Proceedings of the 1976 International Conference on Parallel Processing (1976), pp. 50–54.
Lins, R. D. Cyclic reference counting with lazy mark-scan. Inf. Process. Lett. 44, 4 (Dec. 1992), 215–220.
Lins, R. D. A multi-processor shared memory architecture for parallel cyclic reference counting. Microprocessing and Microprogramming 35, 1–5 (Sept. 1992), 563–568. Proceedings of the 18th EUROMICRO Conference (Paris, France).
Martínez, A. D., Wachenchauzer, R., AND Lins, R. D. Cyclic reference counting with local mark-scan. Inf. Process. Lett 34., 1 (1990), 31–35.
Mccarthy, J. Recursive functions of symbolic expressions and their computation by machine. Commun. ACM 3 (1960), 184–195.
Nettles, S., AND O’Toole, J. Real-time garbage collection. In Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation (Albuquerque, New Mexico, June 1993). SIGPLAN Notices, 28, 6, 217–226.
Rodrigues, H. C. C. D., AND Jones, R. E. Cyclic distributed garbage collection with group merger. In Proceedings of the Twelfth European Conference on Object-Oriented Programming (Brussels, July 1998), E. Jul, Ed., vol. 1445 of Lecture Notes in Computer Science, Springer-Verlag, pp. 249–273.
Rovner, P. On adding garbage collection and runtime types to a strongly-typed, staticallychecked, concurrent language. Tech. Rep. CSL-84-7, Xerox Palo Alto Research Center, July 1985.
Steele, G. L. Multiprocessing compactifying garbage collection. Commun. ACM 18, 9 (Sept. 1975), 495–508.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bacon, D.F., Rajan, V.T. (2001). Concurrent Cycle Collection in Reference Counted Systems. In: Knudsen, J.L. (eds) ECOOP 2001 — Object-Oriented Programming. ECOOP 2001. Lecture Notes in Computer Science, vol 2072. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45337-7_12
Download citation
DOI: https://doi.org/10.1007/3-540-45337-7_12
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42206-8
Online ISBN: 978-3-540-45337-6
eBook Packages: Springer Book Archive