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

数据竞赛与路径上资源重用的离散资源-时间权衡问题

Data Races and the Discrete Resource-time Tradeoff Problem with Resource Reuse over Paths

Rathish Das, Shih-Yu Tsai, Sharmila Duppala, Jayson Lynch, Esther M. Arkin, Rezaul Chowdhury, Joseph S. B. Mitchell, Steven Skiena

摘要:

如果两个或多个逻辑上并行的指令访问同一个内存位置,并且其中至少有一个试图修改其内容,则会发生确定性竞争。竞争经常导致不确定性和不正确的程序行为。数据竞争是确定性竞争的一种特殊情况,可以通过关联互斥锁或允许对内存位置的原子访问来消除。然而,这样的解决方案可以通过串行化对该位置的所有访问来减少并行性。对于关联和交换更新,归约器允许并行的无竞争更新,但代价是使用一些额外的空间。我们提出以下问题。给定一个固定的额外空间预算,以减轻并行程序中的竞争成本,哪些内存位置应该分配给reducer,以及应该如何在reducer之间分配空间,以最大限度地减少总运行时间?我们认为,竞争可以被捕获的有向无环图(DAG),节点代表存储单元和弧代表读-写单元之间的依赖关系。然后,我们制定我们的优化问题的DAG。我们专注于这个问题的一个变体,其中通过沿着DAG的源到宿路径路由额外的空间并将其用于沿着路径的归约器的构造来允许归约器之间的空间重用。作为空间预算的函数的缩减时间)。我们推广我们的种族避免空间-时间权衡问题的离散资源-时间权衡问题,一般不增加的持续时间函数和资源重用路径。对于一般的DAG,离线问题是强NP-困难的所有三个持续时间函数下,我们给近似算法。我们还证明了一般资源时间权衡问题的近似困难性,并给出了串并行DAG的伪多项式时间算法。

英文摘要:

A determinacy race occurs if two or more logically parallel instructions access the same memory location and at least one of them tries to modify its content. Races often lead to nondeterministic and incorrect program behavior. A data race is a special case of a determinacy race which can be eliminated by associating a mutual-exclusion lock or allowing atomic accesses to the memory location. However, such solutions can reduce parallelism by serializing all accesses to that location. For associative and commutative updates, reducers allow parallel race-free updates at the expense of using some extra space. We ask the following question. Given a fixed budget of extra space to mitigate the cost of races in a parallel program, which memory locations should be assigned reducers and how should the space be distributed among the reducers in order to minimize the overall running time? We argue that the races can be captured by a directed acyclic graph (DAG), with nodes representing memory cells and arcs representing read-write dependencies between cells. We then formulate our optimization problem on DAGs. We concentrate on a variation of this problem where space reuse among reducers is allowed by routing extra space along a source to sink path of the DAG and using it in the construction of reducers along the path. We consider two reducers and the corresponding duration functions (i.e., reduction time as a function of space budget). We generalize our race-avoiding space-time tradeoff problem to a discrete resource-time tradeoff problem with general non-increasing duration functions and resource reuse over paths. For general DAGs, the offline problem is strongly NP-hard under all three duration functions, and we give approximation algorithms. We also prove hardness of approximation for the general resource-time tradeoff problem and give a pseudo-polynomial time algorithm for series-parallel DAGs.

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

↑