C11记忆模型下的栅栏综合
Fence Synthesis under the C11 Memory Model
摘要:
C/C++11(C11)标准为内存访问操作提供了一系列的排序保证。这种排序的组合对开发正确和有效的弱记忆程序提出了挑战。一个常见的解决方案,以排除那些违反正确性规范的程序结果是使用C11同步栅栏,建立程序事件的顺序。挑战在于选择栅栏的组合,其(i)恢复输入程序的正确性,(ii)对效率的影响尽可能小(即,最小的一组最弱的栅栏)。该问题是最优栅栏综合问题,对于直线规划是NP难的。在这项工作中,我们提出了第一个栅栏合成技术的C11程序称为FenSying,并显示其最优性。我们还提出了一个接近最优的有效的替代方案,称为fFenSying。我们证明了FenSying的最优性和fFenSying的可靠性,并提出了这两种技术的实现。最后,我们对比了这两种技术的性能,并实证证明fFenSyings的有效性。
英文摘要:
The C/C++11 (C11) standard offers a spectrum of ordering guarantees on memory access operations. The combinations of such orderings pose a challenge in developing correct and efficient weak memory programs. A common solution to preclude those program outcomes that violate the correctness specification is using C11 synchronization-fences, which establish ordering on program events. The challenge is in choosing a combination of fences that (i) restores the correctness of the input program, with (ii) as little impact on efficiency as possible (i.e., the smallest set of weakest fences). This problem is the optimal fence synthesis problem and is NP-hard for straight-line programs. In this work, we propose the first fence synthesis technique for C11 programs called FenSying and show its optimality. We additionally propose a near-optimal efficient alternative called fFenSying. We prove the optimality of FenSying and the soundness of fFenSying and present an implementation of both techniques. Finally, we contrast the performance of the two techniques and empirically demonstrate fFenSyings effectiveness.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。