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

并行最小生成树算法及其评价

Parallel Minimum Spanning Tree Algorithms and Evaluation

Suryanarayana Murthy Durbhakula

摘要:

最小生成树(Minimum Spanning Tree,MST)是一种重要的图论算法,在计算机网络、超大规模集成电路(VLSI)路由、无线通信等领域有着广泛的应用。今天,几乎每台计算机都是由多核处理器构建的。因此,重要的是利用这种并行计算能力的并行化现有的算法和应用程序。大多数早期的并行化MST的工作集中在PRAM模型的算法。这些研究有两个局限性。首先,PRAM模型假设无限的内存带宽,这是不现实的。其次,基于PRAM模型的算法至少需要O(n)个处理器,其中n是顶点的总数。对于大型图,这是不可行的。很少有针对真实系统的实现。在本文中,我提出并评估了两个新的并行MST算法,是并行Boruvka算法的一个变种:i)第一算法使用锁变量没有自旋锁ii)第二算法只使用原子比较和交换(CAS)原语。我在一个六核、12线程的英特尔系统上评估了这些算法在大小高达100万个顶点的各种输入图上的性能。第一种算法比未优化的顺序算法有1.94的加速比,比优化的顺序算法有1.4的加速比。第二种算法比未优化的顺序算法的加速比高达2.03,比优化的顺序算法的加速比高达1.403。当使用CAS的第二算法与第一算法比较时,发现第二算法在四个线程处比第一算法好1.15倍。

英文摘要:

Minimum Spanning Tree (MST) is an important graph algorithm that has wide ranging applications in the areas of computer networks, VLSI routing, wireless communications among others. Today virtually every computer is built out of multi-core processors. Hence it is important to take advantage of such parallel computing power by parallelizing existing algorithms and applications. Most of the earlier work on parallelizing MST focused on algorithms for PRAM models. There are two limitations to such studies. First, PRAM models assume infinite memory bandwidth which is unrealistic. Second, PRAM model based algorithms require at least O(n) processors where n being total number of vertices. For large graphs this is infeasible. There are very few implementations which target real systems. In this paper I present and evaluate two new parallel MST algorithms that are a variant of Parallel Boruvka algorithms: i) First algorithm uses lock variables without spin-locks ii) Second algorithm uses only atomic compare-and-swap (CAS) primitive. I evaluated the performance of these algorithms on a six-core, 12-thread Intel system on various input graphs of sizes up to 1 million vertices. First algorithm showed a speedup of up to1.94 over an un-optimized sequential algorithm and a speedup of up to 1.4 over an optimized sequential algorithm. Second algorithm showed a speedup of up to 2.03 over an un-optimized sequential algorithm and a speedup of up to 1.403 over an optimized sequential algorithm. When second algorithm using CAS is compared with the first algorithm second algorithm is found to be up to 1.15 times better than the first algorithm at four threads.

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

↑