paper

Write-and-f-array: implementation and an application

arXiv:1407.6153

Abstract

We introduce a new shared memory object: the write-and-f-array, provide its wait-free implementation and use it to construct an improved wait-free implementation of the fetch-and-add object. The write-and-f-array generalizes single-writer write-and-snapshot object in a similar way that the f-array generalizes the multi-writer snapshot object. More specifically, a write-and-f-array is parameterized by an associative operator and is conceptually an array with two atomic operations: - write-and-f modifies a single array's element and returns the result of applying to all the elements, - read returns the result of applying to all the array's elements. We provide a wait-free implementation of an -element write-and-f-array with memory complexity, step complexity of the write-and-f operation and step complexity of the read operation. The implementation uses CAS objects and requires their size to be , where is the total number of write-and-f operations executed. We also show, how it can be modified to achieve step complexity of write-and-f, while increasing the memory complexity to . The write-and-f-array can be applied to create a fetch-and-add object for processes with memory complexity and step complexity of the fetch-and-add operation. This is the first implementation of fetch-and-add with polylogarithmic step complexity and subquadratic memory complexity that can be implemented without CAS or LL/SC objects of unrealistic size.

Write-and-f-array: implementation and an application · wovepaper