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

一种可扩展的动态连通性并发算法

A Scalable Concurrent Algorithm for Dynamic Connectivity

Alexander Fedorov, Nikita Koval, Dan Alistarh

摘要:

动态连通性是一个基本的算法图问题,其动机是广泛应用于社交和通信网络,并用作各种其他算法的构建块,例如双连通性和动态最小生成树问题。简而言之,我们希望在动态边插入和删除下保持图的连通分量。在连续的情况下,这个问题已经从理论和实践两个角度得到了很好的研究。然而,更少的是知道有效的并发解决方案,这个问题。这就是我们在本文中要解决的问题。我们从用于解决这个问题的经典数据结构之一--Euler Tour Tree开始。我们的第一个贡献是一个非阻塞的单作家implementationofit. We利用这种数据结构,以获得第一个真正的并发泛化的动态连接,它保留了其顺序对应的时间复杂度,但在实践中也是可扩展的。为了实现这一点,我们主要依靠三种技术。第一个是确保连接查询(通常在现实世界的工作负载中占主导地位)是非阻塞的。第二个非平凡技术通过使所有不改变连接结构的查询成为非阻塞来扩展上述思想。第三个要素是应用细粒度锁定来更新连接的组件,这允许对不相交组件的操作并行发生。我们评估所产生的算法在各种工作负载,执行真实和合成图。结果显示了每个建议的优化的效率;最有效的变体提高了基于粗粒度的实现在实际场景中的性能,平均高达6倍,当连接查询占主导地位时高达30倍。

英文摘要:

Dynamic Connectivity is a fundamental algorithmic graph problem, motivated by a wide range of applications to social and communication networks and used as a building block in various other algorithms, such as the bi-connectivity and the dynamic minimal spanning tree problems. In brief, we wish to maintain the connected components of the graph under dynamic edge insertions and deletions. In the sequential case, the problem has been well-studied from both theoretical and practical perspectives. However, much less is known about efficient concurrent solutions to this problem. This is the gap we address in this paper. We start from one of the classic data structures used to solve this problem, the Euler Tour Tree. Our first contribution is a non-blocking single-writer implementation of it. We leverage this data structure to obtain the first truly concurrent generalization of dynamic connectivity, which preserves the time complexity of its sequential counterpart, but is also scalable in practice. To achieve this, we rely on three main techniques. The first is to ensure that connectivity queries, which usually dominate real-world workloads, are non-blocking. The second non-trivial technique expands the above idea by making all queries that do not change the connectivity structure non-blocking. The third ingredient is applying fine-grained locking for updating the connected components, which allows operations on disjoint components to occur in parallel. We evaluate the resulting algorithm on various workloads, executing on both real and synthetic graphs. The results show the efficiency of each of the proposed optimizations; the most efficient variant improves the performance of a coarse-grained based implementation on realistic scenarios up to 6x on average and up to 30x when connectivity queries dominate.

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

↑