Abstract
The lack of collecting cyclic garbage is generally considered the major weakness of reference counting. Reference counted systems handle this problem by incorporating either a global tracing collector, or a "partial" tracing collector that considers only the cycle candidates but needs several traces on them. In particular, the latter has become a preferred one as it has better scalability and locality (no need to scan the entire heap). This paper presents a new "lightweight" cyclic reference counting algorithm, which is based on partial tracing and deals with the cycle problem in a simpler and more efficient way. By exploiting the lightweight hypothesis that considers a single sub-graph, instead of individual cycles, as the basic unit of cycle collection, the algorithm can detect garbage cycles in a single trace. In addition, we propose a technique for eliminating redundant scans over garbage objects, thus improving the efficiency of the algorithm. The pseudocode and its correctness proof are also presented. Finally, an implementation based on Jikes Research Virtual Machine is provided to demonstrate the effectiveness of the new algorithm.
- B. Alpern, C. R. Attanasio, A. Cocchi, D. Lieber, S. Smith, T. Ngo, J. J. Barton, S. F. Hummel, J. C. Sheperd, and M. Mergen, "Implementing Jalape no in Java," In Proceedings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, Denver, Colorado, ACM SIGPLAN Notices, vol. 34(10), pp. 314--324, ACM Press, October, 1999. Google Scholar
Digital Library
- D. F. Bacon, C. R. Attanasio, H. B. Lee, V. T. Rajan, and S. Smith, "Java without the coffee breaks: A nonintrusive multi-processor garbage collector." In Proceedings of the ACM SIGPLAN'01 Conference on Programming Languages Design and Implementation (PLDI). Snowbird, Utah, vol. 36(5), pp. 92--103, June 2001. Google Scholar
Digital Library
- D. F. Bacon and V. T. Rajan, "Concurrent cycle collection in reference counted systems," In J. L. Knudsen, editor, Proceedings of 15th European Conference on Object-Oriented Programming (ECOOP'01), Budapest, Hungary, Springer-Verlag, LNCS 2072, pp. 207--235, June, 2001. Google Scholar
Digital Library
- T. W. Christopher, "Reference count garbage collection," Software Practice and Experience, vol. 14(6), pp. 503--507, 1984.Google Scholar
Cross Ref
- G. E. Collins, "A method for overlapping and erasure of lists," Communications of the ACM, vol. 3(12), pp. 655--657, December, 1960. Google Scholar
Digital Library
- J. Detreville, "Experience with concurrent garbage collectors for Modula-2+. Tech. Rep. 64," DEC Systems Research Center, Palo Alto, California, 1990.Google Scholar
- S. Dieckmann and U. Hölzle, "A study of the allocation behavior of the SPECjvm98 Java benchmarks," In Proceedings of ECOOP'99, Springer-Verlag, LNCS 1628, pp. 92--115, 1999. Google Scholar
Digital Library
- R. E. Jones and R. D. Lins, Garbage Collection: Algorithms for Automatic Dynamic Memory Management, Wiley, July, 1996. Google Scholar
Digital Library
- R. E. Jones and R. D. Lins, "Cyclic weighted reference counting without delay," In Proceedings of Parallel Architectures and Languages Europe (PARLE'93), A. Bode, M. Reeve, and G. Wolf, Eds., Springer-Verlag, LNCS 694, pp. 712--715, June 1993. Google Scholar
Digital Library
- Y. Levanoni and E. Petrank, "An on-the-fly reference counting garbage collector for Java," In ACM Conference Proceedings on Object-Oriented Programming Systems, Languages, and Applications, Tampa, FL, pp. 367--380, October, 2001. Google Scholar
Digital Library
- C.-Y. Lin and T.-W. Hou, "A lightweight cyclic reference counting algorithm," In Proceedings of the first International Conference on Grid and Pervasive Computing, Taichung, Taiwan, May 3--5, Springer-Verlag, LNCS 3947, pp. 346--359, 2006. Google Scholar
Digital Library
- R. D. Lins, "An efficient algorithm for cyclic reference counting," Information Processing Letters, vol. 83, pp. 145--150, 2002. Google Scholar
Digital Library
- R. D. Lins, "Generational cyclic reference counting," Information Processing Letters, vol. 46, pp. 19--20, 1993. Google Scholar
Digital Library
- R. D. Lins, "Cyclic reference counting with lazy mark-scan," Information Processing Letters, vol. 44, pp. 215--220, 1992. Google Scholar
Digital Library
- R. D. Lins and R. E. Jones, "Cyclic weighted reference counting," in: K. Boyanov (Ed.), Proceedings of International Workshop on Parallel and Distributed Processing, NH, pp. 369--382, May, 1993.Google Scholar
- M. Maeda, H. Konaka, Y. Ishikawa, T. Tomokiyo, A. Hori, and J. Nolte, "On-the-fly global garbage collection based on partly mark-sweep," Springer-Verlag, LNCS 986, pp. 283--296, 1995. Google Scholar
Digital Library
- A. D. Martinez, R. Wachenchauzer and R. D. Lins, "Cyclic reference counting with local mark-scan," Information Processing Letters, vol. 34, pp. 31--35, 1990. Google Scholar
Digital Library
- J. H. McBeth, "On the reference counter method," Communications of the ACM, vol. 6(9), pp. 575, September, 1963. Google Scholar
Digital Library
- J. McCarthy, "Recursive functions of symbolic expressions and their computation by machine," Communications of the ACM, vol. 3, pp. 184--195, 1960. Google Scholar
Digital Library
- H. Paz, E. Petrank, D. F. Bacon, V. T. Rajan, and E. K. Kolodner, "Efficient on-the-fly cycle collection," In Proceedings of the 14th International Conference on Compiler Construction, R. Bodik, editor, Springer- Verlag, LNCS 3443, pp. 156--171, April, 2005. Google Scholar
Digital Library
- Standard Performance Evaluation Corporation, "SPECjvm98 Documentation", release 1.03 edition, March, 1999.Google Scholar
- X. Ye and J. Keane, "Collecting cyclic garbage in distributed systems." In International Symposium on Parallel Architectures, Algorithms and Networks (ISPAN'97), Taipei, Taiwan, pp. 227--231, December, 1997. Google Scholar
Digital Library
Index Terms
A simple and efficient algorithm for cycle collection
Recommendations
An efficient on-the-fly cycle collection
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 ...
A Single-Trace Cycle Collection for Reference Counting Systems
ISPAN '09: Proceedings of the 2009 10th International Symposium on Pervasive Systems, Algorithms, and NetworksThe lack of collecting cyclic garbage is generally considered the major weakness of reference counting. Reference counted systems handle this problem by incorporating either a global tracing collector or a partial tracing collector that considers only ...
Flexible reference-counting-based hardware acceleration for garbage collection
Languages featuring automatic memory management (garbage collection) are increasingly used to write all kinds of applications because they provide clear software engineering and security advantages. Unfortunately, garbage collection imposes a toll on ...






Comments