arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1407.6153cs.DC
收藏

Write-and-f-array:实现和应用

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

Robert Obryk

摘要:

本文介绍了一种新的共享内存对象:写-并-f-数组,给出了它的无等待实现,并用它构造了一个改进的无等待实现的取-加对象。write-and-f-array泛化单写入器write-and-snapshot对象的方式与f-array泛化多写入器snapshot对象的方式类似。更具体地说,write-and-f-array由关联运算符$f$参数化,并且在概念上是具有两个原子操作的数组:- write-and-f修改单个数组的元素并返回将$f$应用于所有元素的结果,- read返回将$f$应用于所有数组元素的结果。我们提供了一个$N$元素写和f数组的无等待实现,具有$O(N \log N)$存储器复杂度、写和f操作的$O(\log^3 N)$步骤复杂度和读操作的$O(1)$步骤复杂度。该实现使用CAS对象,并要求其大小为$Ω(\log M)$,其中$M$是所执行的write-and-f操作的总数。我们还展示了如何修改它以实现$O(\log^2 N)$步骤复杂性的write-and-f,同时将内存复杂性增加到$O(N \log^2 N)$。写入和f数组可以被应用于为具有提取和添加操作的$O(P \log P)$存储器复杂度和$O(\log^3 P)$步骤复杂度的$P$过程创建提取和添加对象。这是第一个实现的取加与多对数步长复杂度和次二次内存复杂度,可以实现没有CAS或LL/SC对象的不切实际的大小。

英文摘要:

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 $f$ and is conceptually an array with two atomic operations: - write-and-f modifies a single array's element and returns the result of applying $f$ to all the elements, - read returns the result of applying $f$ to all the array's elements. We provide a wait-free implementation of an $N$-element write-and-f-array with $O(N \log N)$ memory complexity, $O(\log^3 N)$ step complexity of the write-and-f operation and $O(1)$ step complexity of the read operation. The implementation uses CAS objects and requires their size to be $Ω(\log M)$, where $M$ is the total number of write-and-f operations executed. We also show, how it can be modified to achieve $O(\log^2 N)$ step complexity of write-and-f, while increasing the memory complexity to $O(N \log^2 N)$. The write-and-f-array can be applied to create a fetch-and-add object for $P$ processes with $O(P \log P)$ memory complexity and $O(\log^3 P)$ 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑