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.
- G. Agha and C. Hewitt. Concurrent programmingusing actors: Exploiting large-scale parallelism. In LNCS 1985. Google Scholar
Digital Library
- G. Agha. Actors: A Model of Concurrent Computationin Distributed Systems. MIT Press, 1986. Google Scholar
Digital Library
- J. Armstrong. A history of Erlang. In HOPL III, 2007. Google Scholar
Digital Library
- P. Haller and M. Odersky. Scala actors: Unifying thread-based and event-based programming. In TCS 2008. Google Scholar
Digital Library
- T. Van Cutsem. Ambient References: Object Designationin Mobile Ad hoc Networks. PhD thesis, Vrije Universiteit Brussel, 2008.Google Scholar
- C. Varela, G. Agha, Wei-Jen Wang, et al. The SALSA Programming Language 2.0.0alpha Release Tutorial. Rensselaer Polytechnic Institute, 2009.Google Scholar
- S. Srinivasan and A. Mycroft. Kilim: Isolation-Typed Actors for Java (A Million Actors, Safe Zero-Copy Communication). In ECOOP 2008. Google Scholar
Digital Library
- D. Kafura, D. Washabaugh, J. Nelson. Garbage collection of actors. In OOPSLA 1990. Google Scholar
Digital Library
- A. Vardhan, G. Agha. Using passive object garbage collection algorithms for garbage collection of active objects. In ISMM 2002. Google Scholar
Digital Library
- Wei-Jen Wang, et al. Actor Garbage Collection Using Vertex-Preserving Actor-to-Object Graph Transformations. In GPC 2010. Google Scholar
Digital Library
- S. Tasharofi, P. Dinges, R. Johnson. Why Do Scala Developers Mix the Actor Model with Other Concurrency Models? In ECOOP 2013. Google Scholar
Digital Library
- http://actor-applications.cs.illinois.edu/Google Scholar
- http://www.gotw.ca/publications/concurrency-ddj.htmGoogle Scholar
- http://osl.cs.uiuc.edu/af/Google Scholar
- C. Varela and G. Agha. Programming Dynamically Reconfigurable Open Systems with SALSA. In OOPSLA 2001. Google Scholar
Digital Library
- Wei-Jen Wang and C. Varela. Distributed Garbage Collection for Mobile Actor Systems: The Pseudo Root Approach. In GPC 2006. Google Scholar
Digital Library
- Wei-Jen Wang. Distributed Garbage Collection for Large-Scale Mobile Actor Systems. PhD thesis, Rensselaer Polytechnic Institute, 2006. Google Scholar
Digital Library
- Wei-Jen Wang. Conservative snapshot-based actor garbage collection for distributed mobile actor systems. In Telecommunication Systems, 2011.Google Scholar
Digital Library
- H. Baker. Minimizing reference count updating with deferred and anchored pointers for functional data structures. In ACM SIGPLAN, Sept. 1994. Google Scholar
Digital Library
- Y. Levanoni, E. Petrank. An On-the-Fly Reference-Counting Garbage Collector for Java. In OOPSLA 2001. Google Scholar
Digital Library
- M. Shapiro, D. Plainfossé. A Survey of Distributed Garbage Collection Techniques. In IWMM 1995. Google Scholar
Digital Library
- F. Dehne and R. Lins. Distributed Cyclic Reference Counting. In LNCS 1994. Google Scholar
Digital Library
- D. Bacon and V.T. Rajan. Concurrent Cycle Collection in Reference Counted Systems. In ECOOP 2001. Google Scholar
Digital Library
- L. Moreau and J. Duprat. A Construction ofDistributed Reference Counting. In Acta Informatica 2001. Google Scholar
Digital Library
- L. Moreau, P. Dickman, and R. Jones. Birrell's Distributed Reference Listing Revisited. In TOPLAS 2005. Google Scholar
Digital Library
- R. Jones and R. Lins. Cyclic Weighted Reference Counting Without Delay. In PARLE 1993. Google Scholar
Digital Library
- R. Lins. Lazy Cyclic Reference Counting. In JUCS 2003.Google Scholar
- A. Formiga and R. Lins. A New Architecture for Concurrent Lazy Cyclic Reference Counting on Multi-Processor Systems. In JUCS 2007.Google Scholar
- http://libcppa.blogspot.co.uk/search/label/benchmarkGoogle Scholar
- https://github.com/Neverlord/cppa-benchmarksGoogle Scholar
Index Terms
Fully concurrent garbage collection of actors on many-core machines
Recommendations
Fully concurrent garbage collection of actors on many-core machines
OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applicationsDisposal 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 ...
Age-based garbage collection
Modern generational garbage collectors look for garbage among the young objects, because they have high mortality; however, these objects include the very youngest objects, which clearly are still live. We introduce new garbage collection algorithms, ...
Mostly concurrent garbage collection revisited
Special Issue: Proceedings of the OOPSLA '03 conferenceThe mostly concurrent garbage collection was presented in the seminal paper of Boehm et al. With the deployment of Java as a portable, secure and concurrent programming language, the mostly concurrent garbage collector turned out to be an excellent ...







Comments