Alistarh, Dan ; Matveev, Alexander ; Leiserson, William M ; Shavit, Nir N
The concurrent memory reclamation problem is that of devising a way for a deallocating thread to verify that no other concurrent threads hold references to a memory block being deallocated. To date, in the absence of automatic garbage collection, there is no satisfactory solution to this problem; existing tracking methods like hazard pointers, reference counters, or epoch-based techniques like RCU, are either prohibitively expensive or require significant programming expertise, to the extent that implementing them efficiently can be worthy of a publication. None of the existing techniques are automatic or even semi-automated. In this paper, we take a new approach to concurrent memory reclamation: instead of manually tracking access to memory locations as done in techniques like hazard pointers, or restricting shared accesses to specific epoch boundaries as in RCU, our algorithm, called ThreadScan, leverages operating system signaling to automatically detect which memory locations are being accessed by concurrent threads. Initial empirical evidence shows that ThreadScan scales surprisingly well and requires negligible programming effort beyond the standard use of Malloc and Free.
Support is gratefully acknowledged from the National Science Foundation under grants CCF-1217921, CCF-1301926, and IIS-1447786, the Department of Energy under grant ER26116/DE-SC0008923, and the Oracle corporation. In particular, we would like to thank Dave Dice, Alex Kogan, and Mark Moir from the Oracle Scalable Synchronization Research Group for very useful feedback on earlier drafts of this paper.
123 - 132
SPAA: Symposium on Parallelism in Algorithms and Architectures
Alistarh D, Matveev A, Leiserson W, Shavit N. ThreadScan: Automatic and scalable memory reclamation. In: Vol 2015-June. ACM; 2015:123-132. doi:10.1145/2755573.2755600
Alistarh, D., Matveev, A., Leiserson, W., & Shavit, N. (2015). ThreadScan: Automatic and scalable memory reclamation (Vol. 2015–June, pp. 123–132). Presented at the SPAA: Symposium on Parallelism in Algorithms and Architectures, ACM. https://doi.org/10.1145/2755573.2755600
Alistarh, Dan, Alexander Matveev, William Leiserson, and Nir Shavit. “ThreadScan: Automatic and Scalable Memory Reclamation,” 2015–June:123–32. ACM, 2015. https://doi.org/10.1145/2755573.2755600.
D. Alistarh, A. Matveev, W. Leiserson, and N. Shavit, “ThreadScan: Automatic and scalable memory reclamation,” presented at the SPAA: Symposium on Parallelism in Algorithms and Architectures, 2015, vol. 2015–June, pp. 123–132.
Alistarh D, Matveev A, Leiserson W, Shavit N. 2015. ThreadScan: Automatic and scalable memory reclamation. SPAA: Symposium on Parallelism in Algorithms and Architectures vol. 2015–June. 123–132.
Alistarh, Dan, et al. ThreadScan: Automatic and Scalable Memory Reclamation. Vol. 2015–June, ACM, 2015, pp. 123–32, doi:10.1145/2755573.2755600.
Material in IST: