[Paper Review] Fully Read/Write Fence-Free Work-Stealing with Multiplicity
This paper presents the first fully Read/Write fence-free work-stealing algorithms with multiplicity, a relaxation allowing tasks to be extracted by multiple operations but ensuring each process takes any given task at most once. The proposed algorithms eliminate all Read-After-Write synchronization patterns and Read/Write fences in all operations, achieving wait-freedom and logarithmic or constant step complexity, with experimental results showing superior performance over Cilk, Chase-Lev, and idempotent work-stealing.
Work-stealing is a popular technique to implement dynamic load balancing in a distributed manner. In this approach, each process owns a set of tasks that have to be executed. The owner of the set can put tasks in it and can take tasks from it to execute them. When a process runs out of tasks, instead of being idle, it becomes a thief to steal tasks from a victim. Thus, a work-stealing algorithm provides three high-level operations: Put and Take, which can be invoked only by the owner, and Steal, which can be invoked by a thief. One of the main targets when designing work-stealing algorithms is to make Put and Take as simple and efficient as possible. Unfortunately, it has been shown that any work-stealing algorithm in the standard asynchronous model must use expensive Read- After-Write synchronization patterns or atomic Read-Modify-Write instructions, which may be costly in practice. Thus, prior research has proposed idempotent work-stealing, a relaxation for which there are algorithms with Put and Take devoid of Read-Modify-Write atomic instructions and Read-After-Write synchronization patterns; however, Put uses fences among Write instructions, and Steal uses Compare&Swap and fences among Read instructions. In the TSO model, in which Write (resp. Read) instructions cannot be reordered, there have been proposed fully fence-free work-stealing algorithms whose Put and Take have similar properties but Steal uses Compare&Swap or a lock.
Motivation & Objective
- To address the performance bottleneck of Read-After-Write synchronization and atomic Read-Modify-Write instructions in traditional work-stealing algorithms.
- To design a relaxed work-stealing model that allows tasks to be extracted multiple times but ensures each process takes any task at most once.
- To achieve fully Read/Write fence-free and wait-free work-stealing algorithms under the standard asynchronous shared-memory model.
- To demonstrate that simple synchronization primitives suffice for non-trivial coordination, such as spanning tree computation.
- To evaluate the performance of the proposed algorithms against existing solutions like Cilk, Chase-Lev, and idempotent work-stealing.
Proposed method
- Introduce two relaxations: multiplicity and weak multiplicity, allowing multiple Take/Steal operations per task but limiting each process to one extraction per task.
- Reduce the work-stealing problem with multiplicity to the MaxRegister and RangeMaxRegister data structures, which are relaxed versions of MaxRegister.
- Design a wait-free, fence-free algorithm for weak multiplicity using a MaxRegister to manage the head of the work queue.
- Implement a second algorithm for multiplicity with logarithmic step complexity using a RangeMaxRegister abstraction.
- Ensure all Put, Take, and Steal operations use only Read/Write instructions without fences or atomic Read-Modify-Write operations.
- Use a bounded buffer model to avoid reordering issues in the TSO-like environment, enabling fence-free execution.
Experimental results
Research questions
- RQ1Can work-stealing be made fully fence-free and free of Read-After-Write patterns in all operations, including Steal?
- RQ2Is it possible to design a wait-free work-stealing algorithm under a relaxed semantics that allows task multiplicity?
- RQ3Can MaxRegister and RangeMaxRegister abstractions be used to implement efficient, fence-free work-stealing with multiplicity?
- RQ4Does the proposed algorithm outperform existing work-stealing algorithms like Cilk, Chase-Lev, and idempotent work-stealing in practice?
- RQ5Can the relaxation of multiplicity enable simpler synchronization while preserving correctness and performance in concurrent work-stealing?
Key findings
- The proposed WS-WMULT algorithm achieves better performance than Cilk, Chase-Lev, and idempotent work-stealing on both Intel Core i7 and Xeon clusters.
- For the directed 3D Torus, WS-WMULT achieved a maximum speed-up of 36.61% over Chase-Lev, 8.65% over idempotent FIFO, and 19.6% over idempotent LIFO.
- In the undirected 3D Torus, WS-WMULT achieved a 12.25% maximum speed-up over Chase-Lev, 5.95% over idempotent LIFO, and 0.78% over idempotent FIFO.
- The bounded variant B-WS-WMULT, which uses Swap in Steal, showed lower performance than WS-WMULT but remained competitive with other algorithms.
- The algorithm for weak multiplicity is fully fence-free with constant step complexity, representing the first such solution in the literature.
- Theoretical analysis confirms that work-stealing with multiplicity lies at the lowest level of the consensus number hierarchy, indicating minimal synchronization power is required.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.