skip to main content
research-article

Fully concurrent garbage collection of actors on many-core machines

Published:29 October 2013Publication History
Skip Abstract Section

Abstract

Disposal of dead actors in actor-model languages is as important as disposal of unreachable objects in object-oriented languages. In current practice, programmers are required to either manually terminate actors, or they have to rely on garbage collection systems that monitor actor mutation through write barriers, thread coordination through locks etc. These techniques, however, prevent the collector from being fully concurrent.

We developed a protocol that allows garbage collection to run fully concurrently with all actors. The main challenges in concurrent garbage collection is the detection of cycles of sleeping actors in the actors graph, in the presence of concurrent mutation of this graph. Our protocol is solely built on message passing: it uses deferred direct reference counting, a dedicated actor for the detection of (cyclic) garbage, and a confirmation protocol (to deal with the mutation of the actor graph).

We present our ideas informally through an example, and then present a formal model, prove soundness and argue completeness. We have implemented the protocol as part of a runtime library. As a preliminary performance evaluation, we discuss the performance of our approach as currently used at a financial institution, and use four benchmarks from the literature to compare our approach with other actor-model systems. These preliminary results indicate that the overhead of our approach is small.

References

  1. G. Agha and C. Hewitt. Concurrent programmingusing actors: Exploiting large-scale parallelism. In LNCS 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. G. Agha. Actors: A Model of Concurrent Computationin Distributed Systems. MIT Press, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. Armstrong. A history of Erlang. In HOPL III, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. P. Haller and M. Odersky. Scala actors: Unifying thread-based and event-based programming. In TCS 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. T. Van Cutsem. Ambient References: Object Designationin Mobile Ad hoc Networks. PhD thesis, Vrije Universiteit Brussel, 2008.Google ScholarGoogle Scholar
  6. C. Varela, G. Agha, Wei-Jen Wang, et al. The SALSA Programming Language 2.0.0alpha Release Tutorial. Rensselaer Polytechnic Institute, 2009.Google ScholarGoogle Scholar
  7. S. Srinivasan and A. Mycroft. Kilim: Isolation-Typed Actors for Java (A Million Actors, Safe Zero-Copy Communication). In ECOOP 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Kafura, D. Washabaugh, J. Nelson. Garbage collection of actors. In OOPSLA 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Vardhan, G. Agha. Using passive object garbage collection algorithms for garbage collection of active objects. In ISMM 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Wei-Jen Wang, et al. Actor Garbage Collection Using Vertex-Preserving Actor-to-Object Graph Transformations. In GPC 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. S. Tasharofi, P. Dinges, R. Johnson. Why Do Scala Developers Mix the Actor Model with Other Concurrency Models? In ECOOP 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. http://actor-applications.cs.illinois.edu/Google ScholarGoogle Scholar
  13. http://www.gotw.ca/publications/concurrency-ddj.htmGoogle ScholarGoogle Scholar
  14. http://osl.cs.uiuc.edu/af/Google ScholarGoogle Scholar
  15. C. Varela and G. Agha. Programming Dynamically Reconfigurable Open Systems with SALSA. In OOPSLA 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Wei-Jen Wang and C. Varela. Distributed Garbage Collection for Mobile Actor Systems: The Pseudo Root Approach. In GPC 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Wei-Jen Wang. Distributed Garbage Collection for Large-Scale Mobile Actor Systems. PhD thesis, Rensselaer Polytechnic Institute, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Wei-Jen Wang. Conservative snapshot-based actor garbage collection for distributed mobile actor systems. In Telecommunication Systems, 2011.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. H. Baker. Minimizing reference count updating with deferred and anchored pointers for functional data structures. In ACM SIGPLAN, Sept. 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Y. Levanoni, E. Petrank. An On-the-Fly Reference-Counting Garbage Collector for Java. In OOPSLA 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Shapiro, D. Plainfossé. A Survey of Distributed Garbage Collection Techniques. In IWMM 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. F. Dehne and R. Lins. Distributed Cyclic Reference Counting. In LNCS 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. D. Bacon and V.T. Rajan. Concurrent Cycle Collection in Reference Counted Systems. In ECOOP 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. L. Moreau and J. Duprat. A Construction ofDistributed Reference Counting. In Acta Informatica 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. L. Moreau, P. Dickman, and R. Jones. Birrell's Distributed Reference Listing Revisited. In TOPLAS 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. R. Jones and R. Lins. Cyclic Weighted Reference Counting Without Delay. In PARLE 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. R. Lins. Lazy Cyclic Reference Counting. In JUCS 2003.Google ScholarGoogle Scholar
  28. A. Formiga and R. Lins. A New Architecture for Concurrent Lazy Cyclic Reference Counting on Multi-Processor Systems. In JUCS 2007.Google ScholarGoogle Scholar
  29. http://libcppa.blogspot.co.uk/search/label/benchmarkGoogle ScholarGoogle Scholar
  30. https://github.com/Neverlord/cppa-benchmarksGoogle ScholarGoogle Scholar

Index Terms

  1. Fully concurrent garbage collection of actors on many-core machines

        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 48, Issue 10
          OOPSLA '13
          October 2013
          867 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2544173
          Issue’s Table of Contents
          • cover image ACM Conferences
            OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
            October 2013
            904 pages
            ISBN:9781450323741
            DOI:10.1145/2509136

          Copyright © 2013 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 29 October 2013

          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!