Reference counting is a common approach to memory management.
One challenge with reference counting is cycles
that prevent objects from being deallocated. Systems such as
the C++ and Rust standard libraries introduce two types of
reference: strong and weak. A strong reference allows access
to the object and prevents the object from being deallocated,
while a weak reference only prevents deallocation. A weak
reference can be upgraded to provide a strong reference
provided there are other strong references to the object. Hence,
the upgrade operation is partial, and may fail dynamically.
The classic implementation of this upgrade operation is not
wait-free, that is, it can take arbitrarily long to complete if
there is contention on the reference count.

In this paper, we propose a wait-free algorithm for weak
reference counting. The algorithm requires primitive wait-
free atomic operations of “compare and swap”, and “fetch
and add”. We provide a correctness proof of the algorithm
using the Starling verification tool. We provide a full
implementation in C++ and demonstrate the best and worst case
performance using micro-benchmarks. For our best case
scenario with high contention, our new algorithm provides ~3x
more throughput, while for the worst case the new algorithm
is ~85% slower. Based on a worst case analysis, we provide
a second algorithm that combines the strengths of the two
algorithms, and has a significantly improved worst case with
~30% overhead, while maintaining the ~3x speedup for the
best case.

Sun 18 Jun

Displayed time zone: Eastern Time (US & Canada) change

14:00 - 15:20
ISMM: Session 4 - Allocations and Garbage CollectionISMM 2023 at Magnolia 22
Chair(s): Tony Hosking Australian National University

#ismm-1400-session4-magnolia22 Discord icon small YouTube icon small

Concurrent GCs and Modern Java Workloads: A Cache PerspectiveBest Paper Award
ISMM 2023
Maria Carpen-Amarie Huawei Zurich Research Center, Switzerland, Georgios Vavouliotis Huawei Zurich Research Center, Switzerland, Konstantinos Tovletoglou Huawei Zurich Research Center, Switzerland, Boris Grot University of Edinburgh, UK, Rene Mueller Huawei Zurich Research Center, Switzerland
Wait-Free Weak Reference Counting
ISMM 2023
Matthew J. Parkinson Azure Research, Microsoft, UK, Sylvan Clebsch Azure Research, Ben Simner
NUMAlloc: A Faster NUMA Memory Allocator
ISMM 2023
Hanmei Yang University of Massachusetts Amherst, Xin Zhao University of Massachusetts Amherst, Jin Zhou University of Massachusetts Amherst, Wei Wang University of Texas at San Antonio, USA, Sandip Kundu University of Massachusetts Amherst, Bo Wu Colorado School of Mines, Hui Guan University of Massachusetts, Amherst, Tongping Liu University of Massachusetts at Amherst
Picking a CHERI Allocator: Security and Performance Considerations
ISMM 2023
Jacob Bramley Arm, Dejice Jacob University of Glasgow, UK, Andrei Lascu King's College London, Jeremy Singer University of Glasgow, Laurence Tratt King's College London, Andrei Lascu King's College London
DOI Pre-print