arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1408.1935cs.DC
收藏

具有良好摊销复杂度的非阻塞双向链表

Non-Blocking Doubly-Linked Lists with Good Amortized Complexity

Niloufar Shafiei

摘要:

我们提出了一个新的非阻塞双向链表实现的异步共享内存系统。这是第一个这样的实现,摊销时间复杂度的上限已被证明。在我们的实现中,操作通过游标访问列表。每个游标都与列表中的一个项相关联,并且是进程的本地游标。该实现支持两个更新操作,insertBefore和delete,以及两个移动操作,moveRight和moveLeft。insertBefore(c,x)操作将一个元素x插入到列表中光标c的位置之前。delete(c)操作删除光标c所在位置的项,并将光标设置为列表中的下一项。移动操作将光标向右或向左移动一个位置。更新操作使用单字Compare&Swap指令。移动操作只读取共享内存,而不会改变数据结构的状态。如果所有更新操作修改列表的不同部分,则它们完全并发运行。设cp(op)为操作op期间任何一次活动游标的最大数量。每个更新操作op的摊销复杂度为O(cp(op)),每个移动操作的摊销复杂度为O(1)。我们已经编写了详细的正确性证明和实现的摊还分析。

英文摘要:

We present a new non-blocking doubly-linked list implementation for an asynchronous shared-memory system. It is the first such implementation for which an upper bound on amortized time complexity has been proved. In our implementation, operations access the list via cursors. Each cursor is associated with an item in the list and is local to a process. The implementation supports two update operations, insertBefore and delete, and two move operations, moveRight and moveLeft. An insertBefore(c, x) operation inserts an item x into the list immediately before the cursor c's location. A delete(c) operation removes the item at the cursor c's location and sets the cursor to the next item in the list. The move operations move the cursor one position to the right or left. The update operations use single-word Compare&Swap instructions. The move operations only read shared memory and never change the state of the data structure. If all update operations modify different parts of the list, they run completely concurrently. Let cp(op) be the maximum number of active cursors at any one time during the operation op. The amortized complexity of each update operation op is O(cp(op)) and each move operation is O(1). We have written a detailed correctness proof and amortized analysis of our implementation.

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

↑