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

PathCAS:并行搜索数据结构的有效中间层

PathCAS: An Efficient Middle Ground for Concurrent Search Data Structures

Trevor Brown, William Sigouin, Dan Alistarh

摘要:

为了最大限度地提高并发数据结构的性能,研究人员经常转向高度复杂的细粒度技术,从而产生高效和优雅的算法,然而,这些算法通常难以理解和证明正确。虽然存在更简单的技术,如事务内存,但相对于细粒度的技术,它们的性能或可移植性有限。这种复杂性-性能范围两端的方法已经被广泛探索,但相对较少了解中间地带:愿意牺牲一些性能以实现简单性的方法,同时与最先进的手工设计保持竞争力。在本文中,我们探索这一中间地带,并提出PathCAS,一个原语,结合了多字CAS(KCAS)和事务内存方法的想法,同时小心地避免开销。我们展示了如何PathCAS可以用来实现高效的搜索数据结构相对简单,使用内部二叉搜索树作为一个例子,然后扩展到一个AVL树。我们最好的实现优于许多手工制作的搜索树:在搜索繁重的工作负载中,它可以与BCCO树[5]相媲美,BCCO树是搜索性能最快的已知并发二叉树[3]。我们的研究结果表明,PathCAS可以产生并发的数据结构,是相对容易建立和证明正确的,同时提供令人惊讶的高性能。

英文摘要:

To maximize the performance of concurrent data structures, researchers have often turned to highly complex fine-grained techniques, resulting in efficient and elegant algorithms, which can however be often difficult to understand and prove correct. While simpler techniques exist, such as transactional memory, they can have limited performance or portability relative to their fine-grained counterparts. Approaches at both ends of this complexity-performance spectrum have been extensively explored, but relatively less is known about the middle ground: approaches that are willing to sacrifice some performance for simplicity, while remaining competitive with state-of-the-art handcrafted designs. In this paper, we explore this middle ground, and present PathCAS, a primitive that combines ideas from multi-word CAS (KCAS) and transactional memory approaches, while carefully avoiding overhead. We show how PathCAS can be used to implement efficient search data structures relatively simply, using an internal binary search tree as an example, then extending this to an AVL tree. Our best implementations outperform many handcrafted search trees: in search-heavy workloads, it rivals the BCCO tree [5], the fastest known concurrent binary tree in terms of search performance [3]. Our results suggest that PathCAS can yield concurrent data structures that are relatively easy to build and prove correct, while offering surprisingly high performance.

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

↑