v0.1 Wait-Free Help Queue
Pre-releaseDescription
The wait-free queue is a foundational structure of the simulation algorithm. Each operation which does not succeed during the fast-path has a description of it put in this help queue. Instead of the standard ENQUEUE
and DEQUEUE
operations, it supports ENQUEUE
, PEEK
AND CONDITIONALLY-REMOVE-HEAD
which are the ones required for the simulation algorithm.
If a thread fails to complete an operation due to contention, it asks for help by enqueuing a request on the help queue. This request is a pointer to a small object allocated on the heap which uniquely identifies the operation. It is modified only by using the CAS
primitive and is reclaimed only when the operation is complete.
The provided implementation in this release has been tested with both single threaded programs and multithreaded programs.