arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1611.07372cs.LO
收藏

用自失效与自降级修复围栏

Mending Fences with Self-Invalidation and Self-Downgrade

Parosh Aziz Abdulla, Mohamed Faouzi Atig, Stefanos Kaxiras, Carl Leonardsson, Alberto Ros, Yunyun Zhu

AI总结:

本文提出一种形式化模型和反例引导的围栏插入算法,用于在自失效与自降级缓存一致性协议下确保程序正确性,并优化围栏总成本。

摘要:

基于自失效和自降级的缓存一致性协议近年来因其简单性、潜在的性能效率和低能耗而受到越来越多的关注。然而,此类协议会导致内存指令重排序,从而引发程序员通常不期望的额外程序行为。我们提出了一种新颖的形式化模型,该模型捕获在此类协议下运行的程序语义,并具有一组与一致性层交互的围栏。利用该模型,我们设计了一种算法来分析可达性,并检查程序在当前围栏集合下是否满足给定的安全属性。我们描述了一种插入最优围栏集合的方法,以确保程序在此类协议下的正确性。该方法依赖于反例引导的围栏插入过程。我们方法的一个特点是它可以处理各种围栏(具有不同的成本)。这种多样性使得优化更加困难,因为必须优化插入围栏的总成本,而不仅仅是其数量。为了展示我们方法的优势,我们实现了一个原型,并在广泛的示例和基准上运行了它。我们还通过模拟评估了由此产生的围栏程序的性能。

英文摘要:

Cache coherence protocols based on self-invalidation and self-downgrade have recently seen increased popularity due to their simplicity, potential performance efficiency, and low energy consumption. However, such protocols result in memory instruction reordering, thus causing extra program behaviors that are often not intended by the programmers. We propose a novel formal model that captures the semantics of programs running under such protocols, and features a set of fences that interact with the coherence layer. Using the model, we design an algorithm to analyze the reachability and check whether a program satisfies a given safety property with the current set of fences. We describe a method for insertion of optimal sets of fences that ensure correctness of the program under such protocols. The method relies on a counter-example guided fence insertion procedure. One feature of our method is that it can handle a variety of fences (with different costs). This diversity makes optimization more difficult since one has to optimize the total cost of the inserted fences, rather than just their number. To demonstrate the strength of our approach, we have implemented a prototype and run it on a wide range of examples and benchmarks. We have also, using simulation, evaluated the performance of the resulting fenced programs.

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

↑