arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1303.4312cs.DC
收藏

完美的负载平衡、优化、稳定、并行合并

Perfectly load-balanced, optimal, stable, parallel merge

Christian Siebert, Jesper Larsson Träff

摘要:

我们提出了一个简单的,工作最佳和同步免费的解决方案,稳定地合并在并行两个给定的,有序的数组的m和n个元素到一个有序的数组的m+n个元素。的主要贡献是一个新的,简单,快速和直接的算法,确定任何前缀的稳定合并的输出序列,准确的前缀的两个输入序列需要产生这个输出前缀。更确切地说,对于所得到的、但尚未构造的表示输出前缀的输出数组中的任何给定索引(秩),该算法计算表示所需输入前缀的两个输入数组中的每一个中的索引(共秩),而不必合并输入数组。时间复杂度为O(log min(m,n))。该算法被用来设计一个完美的负载平衡,稳定,并行合并算法,其中每个p个处理元素有完全相同数量的输入元素合并。与其他方法的并行合并问题相比,我们的算法是相当简单,可以更快的两倍。与以往的算法相比,解决共同排名问题,这里给出的算法是直接的,并保持稳定的存在重复的元素,在没有额外的空间或时间成本。当处理单元数量p不超过(m+n)/log min(m,n)时,并行合并算法具有最佳加速比。它易于在共享和分布式存储并行系统上实现。

英文摘要:

We present a simple, work-optimal and synchronization-free solution to the problem of stably merging in parallel two given, ordered arrays of m and n elements into an ordered array of m+n elements. The main contribution is a new, simple, fast and direct algorithm that determines, for any prefix of the stably merged output sequence, the exact prefixes of each of the two input sequences needed to produce this output prefix. More precisely, for any given index (rank) in the resulting, but not yet constructed output array representing an output prefix, the algorithm computes the indices (co-ranks) in each of the two input arrays representing the required input prefixes without having to merge the input arrays. The co-ranking algorithm takes O(log min(m,n)) time steps. The algorithm is used to devise a perfectly load-balanced, stable, parallel merge algorithm where each of p processing elements has exactly the same number of input elements to merge. Compared to other approaches to the parallel merge problem, our algorithm is considerably simpler and can be faster up to a factor of two. Compared to previous algorithms for solving the co-ranking problem, the algorithm given here is direct and maintains stability in the presence of repeated elements at no extra space or time cost. When the number of processing elements p does not exceed (m+n)/log min(m,n), the parallel merge algorithm has optimal speedup. It is easy to implement on both shared and distributed memory parallel systems.

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

↑