Brief Announcement Hyaline: Fast and Transparent Memory Reclamation
Ruslan Nikolaev and Binoy Ravindran
rnikola@vt.edu, binoy@vt.edu
Systems Software Research Group Virginia Tech, USA
Brief Announcement Hyaline : Fast and Transparent Memory - - PowerPoint PPT Presentation
Brief Announcement Hyaline : Fast and Transparent Memory Reclamation Ruslan Nikolaev and Binoy Ravindran rnikola@vt.edu, binoy@vt.edu Systems Software Research Group Virginia Tech, USA Memory Reclamation Problem Concurrent programming is
Ruslan Nikolaev and Binoy Ravindran
rnikola@vt.edu, binoy@vt.edu
Systems Software Research Group Virginia Tech, USA
– Non-blocking (lock-free) data structures require special
treatment of deleted memory objects
– Garbage collectors are often impractical in C/C++
– Non-blocking: protecting non-blocking data structures – Robust: bound memory usage even when threads are
stalled or preempted
– Transparent: avoid implicit assumptions about threads;
they can be created/deleted dynamically
– Distributed reference counting, triggered only when
deleting objects
– Maintains multiple global lists of deleted objects – Each list is used by a subset of threads
Handle (Thread i) ... Handle (Thread j) NRef + HRef NRef NRef ... NRef NRef NRef NRef ≤ 0 Head [HRef, HPtr] New Head NRef NRef NRef ... (1) (2) (3)
Scheme Performance Robust Transparent Extra Memory API complexity
Reference Counting Very Slow Yes Partially (swap) Double each pointer Intrusive Hazard Pointers Slow Yes No (deletion) 1 word Hard Epoch Based Reclamation Fast No No (deletion) 1 word Easy Hazard Eras Fast Yes No (deletion) 3 words Hard Interval Based Reclamation (2GEIBR) Fast Yes No (deletion) 3 words Medium Hyaline Very Fast No Yes 3 words Easy Hyaline-1 Very Fast No Almost 3 words Easy Hyaline-S Fast Yes Yes 3 words Medium Hyaline-1S Fast Yes Almost 3 words Medium
25 50 75 100 125 1 9 18 27 36 45 54 63 72 81 90 99 108 117 126 135 144
Threads Throughput (M ops/sec)
Leak Memory Epoch Hyaline Hyaline−1 Hyaline−S Hyaline−1S IBR HE HP
1000 2000 3000 1 9 18 27 36 45 54 63 72 81 90 99 108 117 126 135 144
Threads Retired Objects per Operation
Epoch IBR Hyaline Hyaline−1 Hyaline−S Hyaline−1S HE HP
0.15 0.20 0.25 1 9 18 27 36 45 54 63 72 81 90 99 108 117 126 135 144
Threads Throughput (M ops/sec)
Epoch Hyaline Hyaline−1 Hyaline−S Hyaline−1S IBR
1000 1500 1 9 18 27 36 45 54 63 72 81 90 99 108 117 126 135 144
Threads Retired Objects per Operation
IBR Hyaline Hyaline−1 Hyaline−S Hyaline−1S
Bonsai Tree Hash Map Xeon E7-8880 v3 2.30 GHz, 72 cores
– https://github.com/rusnikola/lfsmr
– https://arxiv.org/pdf/1905.07903.pdf
Thank you!