arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2004.12532cs.DS
收藏

使用异读异写存储器的就地分区算法

In-Place Parallel-Partition Algorithms using Exclusive-Read-and-Write Memory

William Kuszmaul, Alek Westover

摘要:

我们提出了一个就地算法的划分问题,具有线性工作和多对数跨度。该算法仅使用独占读/写共享变量,并且可以使用并行循环来实现,而无需任何额外的并发考虑(即,算法是EREW)。该算法的一个关键特征是,它表现出可证明的最佳缓存行为,小顺序的因素。我们还提出了第二个就地EREW算法的分区问题,具有线性的工作和跨度$O(\log n \cdot \log \log n)$,这是一个$O(\log\log n)$因素的最佳跨度。通过使用这种低跨度算法作为缓存友好算法内的子程序,我们能够获得一个单一的EREW算法,结合他们的理论保证:该算法实现跨度$O(\log n \cdot \log \log n)$和最佳的缓存行为。作为直接的结果,我们也得到了一个就地EREW快速排序算法,其工作为$O(n \log n)$,span $O(\log^2 n \cdot \log \log n)$。而标准EREW算法的并行分区是内存带宽限制在大量的核心,我们的高速缓存友好的算法是能够实现接近理想的规模在实践中,通过避免内存带宽瓶颈。该算法的性能与Francis,Pannan,Frias和Petit的Blocked Strided算法相当,这是并行EREW排序算法的先前最先进的技术,但缺乏对其跨度和缓存行为的理论保证。

英文摘要:

We present an in-place algorithm for the partition problem that has linear work and polylogarithmic span. The algorithm uses only exclusive read/write shared variables, and can be implemented using parallel-for-loops without any additional concurrency considerations (i.e., the algorithm is EREW). A key feature of the algorithm is that it exhibits provably optimal cache behavior, up to small-order factors. We also present a second in-place EREW algorithm for the partition problem that has linear work and span $O(\log n \cdot \log \log n)$, which is within an $O(\log\log n)$ factor of the optimal span. By using this low-span algorithm as a subroutine within the cache-friendly algorithm, we are able to obtain a single EREW algorithm that combines their theoretical guarantees: the algorithm achieves span $O(\log n \cdot \log \log n)$ and optimal cache behavior. As an immediate consequence, we also get an in-place EREW quicksort algorithm with work $O(n \log n)$, span $O(\log^2 n \cdot \log \log n)$. Whereas the standard EREW algorithm for parallel partitioning is memory-bandwidth bound on large numbers of cores, our cache-friendly algorithm is able to achieve near-ideal scaling in practice by avoiding the memory-bandwidth bottleneck. The algorithm's performance is comparable to that of the Blocked Strided Algorithm of Francis, Pannan, Frias, and Petit, which is the previous state-of-the art for parallel EREW sorting algorithms, but which lacks theoretical guarantees on its span and cache behavior.

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

↑