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

使用Futures进行高效的竞赛检测

Efficient Race Detection with Futures

Robert Utterback, Kunal Agrawal, Jeremy Fineman, I-Ting Angelina Lee

摘要:

本文讨论了在使用期货的任务并行程序中可证明有效和实用的运行中确定性竞争检测问题。以前的作品确定性竞争检测主要集中在任务并行程序,遵循串并行依赖结构或不受限制地使用期货,产生任意依赖。在这项工作中,我们考虑了有限使用的期货,并表明它可以更有效地检测比一般使用的期货种族。具体来说,我们提出了两个算法:MultiBags和MultiBags+。MultiBags针对以受限方式使用期货并按时间$O(T_1 α(m,n))$运行的程序,其中$T_1$是程序的顺序运行时间,$α$是逆Ackermann函数,$m$是内存访问的总数,$n$是创建并行性的位置的动态计数。由于$α$是一个增长非常缓慢的函数(对于所有实际目的,上限为$4$),因此可以将其视为接近常数的开销。MultiBags+ MultiBags的一个扩展,它以具有期货一般用途的目标程序为目标。它在时间$O((T_1+k^2)α(m,n))$中运行,其中$T_1$、$α$、$m$和$n$如前所述定义,$k$是计算中未来操作的数量。我们实现了这两种算法,并实证证明了它们的效率。

英文摘要:

This paper addresses the problem of provably efficient and practically good on-the-fly determinacy race detection in task parallel programs that use futures. Prior works determinacy race detection have mostly focused on either task parallel programs that follow a series-parallel dependence structure or ones with unrestricted use of futures that generate arbitrary dependences. In this work, we consider a restricted use of futures and show that it can be race detected more efficiently than general use of futures. Specifically, we present two algorithms: MultiBags and MultiBags+. MultiBags targets programs that use futures in a restricted fashion and runs in time $O(T_1 α(m,n))$, where $T_1$ is the sequential running time of the program, $α$ is the inverse Ackermann's function, $m$ is the total number of memory accesses, $n$ is the dynamic count of places at which parallelism is created. Since $α$ is a very slowly growing function (upper bounded by $4$ for all practical purposes), it can be treated as a close-to-constant overhead. MultiBags+ an extension of MultiBags that target programs with general use of futures. It runs in time $O((T_1+k^2)α(m,n))$ where $T_1$, $α$, $m$ and $n$ are defined as before, and $k$ is the number of future operations in the computation. We implemented both algorithms and empirically demonstrate their efficiency.

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

↑