DeepAI
Log In Sign Up

Safe Deferred Memory Reclamation with Types

11/28/2018
by   Ismail Kuru, et al.
0

Memory management in lock-free data structures remains a major challenge in concurrent programming. Design techniques including read-copy-update (RCU) and hazard pointers provide workable solutions, and are widely used to great effect. These techniques rely on the concept of a grace period: nodes that should be freed are placed on a deferred free list, and all threads obey a protocol to ensure that the deallocating thread can detect when all possible readers have completed their use of the object. This provides an approach to safe deallocation, but only when these subtle protocols are implemented correctly. We present a static type system to ensure correct use of RCU memory management: that nodes removed from a data structure are always scheduled for subsequent deallocation, and that nodes are scheduled for deallocation at most once. As part of our soundness proof, we give an abstract semantics for RCU memory management primitives which captures the fundamental properties of RCU. Our type system allows us to give the first proofs of memory safety for RCU linked list and binary search tree implementations without requiring full verification.

READ FULL TEXT

page 1

page 2

page 3

page 4

08/20/2018

Every Data Structure Deserves Lock-Free Memory Reclamation

Memory-management support for lock-free data structures is well known to...
10/25/2019

Pointer Life Cycle Types for Lock-Free Data Structures with Memory Reclamation

We consider the verification of lock-free data structures that manually ...
12/31/2020

Bundled References: An Abstraction for Highly-Concurrent Linearizable Range Queries

We present bundled references, a new building block to provide lineariza...
02/17/2020

Concurrent Reference Counting and Resource Management in Wait-free Constant Time

A common problem when implementing concurrent programs is efficiently pr...
11/08/2022

The ERA Theorem for Safe Memory Reclamation

Safe memory reclamation (SMR) schemes for concurrent data structures off...
05/12/2021

Semantics, Verification, and Efficient Implementations for Tristate Numbers

Extended Berkeley Packet Filter(BPF)is an in-kernel, register-based virt...
12/29/2020

NBR: Neutralization Based Reclamation

Safe memory reclamation (SMR) algorithms suffer from a trade-off between...