A Lock-free concurrent Toolkit for hazard pointers and Read-Copy-Update

This talk introduces the concept of a Concurrency Toolkit that contains the proposed lock-free algorithms on Hazard Pointers and Read-Copy_Update and analyzes their motivation, while showing where they can be useful and their performance differences.

Under optimistic concurrency, threads may use shared resources concurrently with other threads that may make such resources unavailable for further use. Care must be taken to reclaim such resources only after it is guaranteed that no threads are concurrently using them or will subsequently use them. More specifically, concurrent dynamic data structures that employ optimistic concurrency allow threads to access dynamic objects concurrently with threads that may remove such objects. Without proper precautions, it is generally unsafe to reclaim the removed objects, as they may yet be accessed by threads that hold references to them. Solutions for the safe reclamation problem can also be used to prevent the ABA problem, a common problem under optimistic concurrency. There are several methods for safe deferred reclamation. The main methods are garbage collection, reference counting, RCU (read-copy-update), and hazard pointers. Each method has its pros and cons and none of the methods provides the best features in all cases. Therefore, it is desirable to offer users the opportunity to choose the most suitable methods for their use cases.

This talk will show why we are considering their inclusion (with the exception of garbage collection) in future C++ Standards under SG14/SG1 into the Concurrency TS.

Speaker: Michael Wong


Go back