【24h】

Lock-free Fill-in Queue

机译:无锁填写队列

获取原文

摘要

One of the fundamental data structure that is commonly used in parallel and concurrent systems is first-in-first-out queue. Many studies propose lock-based concurrent queue algorithms to satisfy correctness property. However, the use of locks results in delays, contention, deadlock and some other issues. Instead, lock-free algorithms are introduced to overcome such issues and improve performance. Some lock-free algorithms use an atomic operation compare-and-swap (CAS) while some others replace it with fetch-and-add (FAA), to improve the performance. From implementation perspective, some queue algorithms use array data structure to ease the enqueuing and dequeuing processes but the size of queue is static. On the other hand, many queue algorithms use linked data structure where the size of queue is dynamic but the enqueuing and dequeuing processes are complicated. In this paper, we introduce new algorithms for concurrent queue that merge the ideas of array and linked data structure to get the advantages of both. Actually, our queue consists of circular linked list with $k$ empty (dummy) nodes. Therefore, in normal case it works like array. The enqueue process places the data in one of the empty nodes (at tail position), while the dequeue process deletes the data from a non-empty node (at head position), and no need to maintain the linked list queue. However, our queue is dynamic such that we change the queue size by either creating new node and connect it to the linked-list, or deleting some exist nodes. Our algorithm eases the enqueue and dequeue processes, and reduces the use of CAS operations. Therefore, it improves the performance comparing to existing queue algorithms that use CAS, and almost matches the performances of the algorithms that use FAA.
机译:并行和并发系统中常用的基本数据结构之一是先进先出队列。许多研究提出了基于锁的并发队列算法来满足正确性属性。但是,使用锁会导致延迟,争用,死锁和其他一些问题。相反,引入了无锁算法来克服此类问题并提高性能。一些无锁算法使用原子操作比较与交换(CAS),而另一些则用取与加(FAA)代替,以提高性能。从实现的角度来看,某些队列算法使用数组数据结构来简化入队和出队过程,但是队列的大小是静态的。另一方面,许多队列算法使用链接数据结构,其中队列的大小是动态的,但入队和出队过程却很复杂。在本文中,我们引入了新的并发队列算法,该算法融合了数组和链接数据结构的思想,从而获得了两者的优势。实际上,我们的队列由循环链表组成, $ k $ 空(虚拟)节点。因此,在正常情况下,它的工作方式类似于数组。入队过程将数据放置在一个空节点(位于尾端位置)中,而出队过程从一个非空节点(位于头位置)中删除数据,而无需维护链接列表队列。但是,我们的队列是动态的,因此我们可以通过创建新节点并将其连接到链表或删除一些现有节点来更改队列大小。我们的算法简化了入队和出队过程,并减少了CAS操作的使用。因此,与使用CAS的现有队列算法相比,它提高了性能,并且几乎与使用FAA的算法的性能相匹配。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号