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

无原子二元分叉模型的低深度并行算法

Low-Depth Parallel Algorithms for the Binary-Forking Model without Atomics

Zafar Ahmad, Rezaul Chowdhury, Rathish Das, Pramod Ganapathi, Aaron Gregory, Mohammad Mahdi Javanmard

摘要:

Binary-forking模型是一种并行计算模型,最近由Blelloch等人正式定义,其中线程可以递归和异步地派生并发子线程。该模型产生$Θ(\log n)$的成本来产生或同步$n$任务或线程。二进制分叉模型真实地捕获了在多核共享内存机器上使用现代多线程程序设计语言实现的并行算法的性能。相比之下,广泛研究的理论PRAM模型不考虑产生和同步线程的成本,因此,在PRAM模型中实现最佳性能界限的算法在二进制分叉模型中可能不是最佳的。通常,算法需要重新设计,以达到最佳的性能界限,在二进制分叉模型和非恒定的同步成本使任务具有挑战性。虽然二进制分叉模型允许使用原子{\em test-and-set}(TS)指令来减少一些同步开销,但是假设这样的指令的可用性对硬件提出了更强的要求,并且可能限制使用它们的算法的可移植性。在本文中,我们避免使用锁和原子指令在我们的算法中,除了可能在连接操作,这是由运行时系统实现。在本文中,我们设计了有效的并行算法的二进制分叉模型,没有原子的三个基本问题:Strassen的(和Strassen样)矩阵乘法(MM),基于比较的排序,和快速傅立叶变换(FFT)。我们所有的结果都改善了在二进制分叉模型中的相应问题的已知结果,无论有没有原子。

英文摘要:

The binary-forking model is a parallel computation model, formally defined by Blelloch et al. very recently, in which a thread can fork a concurrent child thread, recursively and asynchronously. The model incurs a cost of $Θ(\log n)$ to spawn or synchronize $n$ tasks or threads. The binary-forking model realistically captures the performance of parallel algorithms implemented using modern multithreaded programming languages on multicore shared-memory machines. In contrast, the widely studied theoretical PRAM model does not consider the cost of spawning and synchronizing threads, and as a result, algorithms achieving optimal performance bounds in the PRAM model may not be optimal in the binary-forking model. Often, algorithms need to be redesigned to achieve optimal performance bounds in the binary-forking model and the non-constant synchronization cost makes the task challenging. Though the binary-forking model allows the use of atomic {\em test-and-set} (TS) instructions to reduce some synchronization overhead, assuming the availability of such instructions puts a stronger requirement on the hardware and may limit the portability of the algorithms using them. In this paper, we avoid the use of locks and atomic instructions in our algorithms except possibly inside the join operation which is implemented by the runtime system. In this paper, we design efficient parallel algorithms in the binary-forking model without atomics for three fundamental problems: Strassen's (and Strassen-like) matrix multiplication (MM), comparison-based sorting, and the Fast Fourier Transform (FFT). All our results improve over known results for the corresponding problem in the binary-forking model both with and without atomics.

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

↑