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

恒定时间快照及其在并发数据结构中的应用

Constant-Time Snapshots with Applications to Concurrent Data Structures

Yuanhao Wei, Naama Ben-David, Guy E. Blelloch, Panagiota Fatourou, Eric Ruppert, Yihan Sun

摘要:

我们提出了一种方法,有效地采取快照的CAS对象的集合的状态。拍摄快照允许以后的操作读取每个CAS对象在拍摄快照时所具有的值。拍摄快照需要固定的步骤数,并返回快照的句柄。使用此句柄读取单个CAS对象的快照值是无等待的,所花费的时间与自快照拍摄以来对象上成功CAS的数量成比例。我们的快速,灵活的快照产生简单,有效的实现原子多点查询的并发数据结构从CAS对象。例如,在使用CAS更新子指针的搜索树中,一旦拍摄了快照,就可以原子地搜索键的范围,找到与某些标准匹配的第一个键,或者检查键的集合是否全部存在,只需对树的快照运行标准顺序算法。为了评估我们的方法的性能,我们将其应用到两个搜索树,一个平衡,一个不。实验表明,支持快照的开销在各种工作负载上都很低。此外,在几乎所有情况下,从我们的快照构建的树上的范围查询的性能与支持原子范围查询的最先进的并发数据结构一样好或更好。

英文摘要:

We present an approach for efficiently taking snapshots of the state of a collection of CAS objects. Taking a snapshot allows later operations to read the value that each CAS object had at the time the snapshot was taken. Taking a snapshot requires a constant number of steps and returns a handle to the snapshot. Reading a snapshotted value of an individual CAS object using this handle is wait-free, taking time proportional to the number of successful CASes on the object since the snapshot was taken. Our fast, flexible snapshots yield simple, efficient implementations of atomic multi-point queries on concurrent data structures built from CAS objects. For example, in a search tree where child pointers are updated using CAS, once a snapshot is taken, one can atomically search for ranges of keys, find the first key that matches some criteria, or check if a collection of keys are all present, simply by running a standard sequential algorithm on a snapshot of the tree. To evaluate the performance of our approach, we apply it to two search trees, one balanced and one not. Experiments show that the overhead of supporting snapshots is low across a variety of workloads. Moreover, in almost all cases, range queries on the trees built from our snapshots perform as well as or better than state-of-the-art concurrent data structures that support atomic range queries.

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

↑