This paper presents a lock-free parallel algorithm for mark&sweep garbage collection (GC) in a realistic model using synchronization primitives compare-and-swap (CAS) and load-linked/store-conditional (LL/SC) offered by machine architectures. Mutators and collectors can simultaneously operate on the data structure. In particular no strict alternation between usage and cleaning up is necessary contrary to what is common in most other GC algorithms. We first design and prove an algorithm with a coarse grain of atomicity and subsequently apply the reduction theorem to implement the higher-level atomic steps by means of the low-level primitives CAS or LL/SC. Even so, the structure of our algorithm and its correctness properties, as well as the complexity of reasoning about them, makes neither automatic nor manual verification feasible. We have therefore chosen the higher-order interactive theorem prover PVS for mechanical support.
Springer
Lecture Notes in Computer Science
International Symposium on Parallel and Distributed Processing and Applications
Computer Security

Gao, H., Groote, J. F., & Hesselink, W. (2005). Lock-free parallel garbage collection. In Proceedings of Third International Symposium on Parallel and Distributed Processing and Applications 2005 (pp. 263–274). Springer.