...
【24h】

Specifying and Checking Semantic Atomicity for Multithreaded Programs

机译:指定和检查多线程程序的语义原子性

获取原文
获取原文并翻译 | 示例
           

摘要

In practice, it is quite difficult to write correct multithreaded programs due to the potential for unintended and nondeterministic interference between parallel threads. A fundamental correctness property for such programs is atomicity-a block of code in a program is atomic if, for any parallel execution of the program, there is an execution with the same overall program behavior in which the block is executed serially.; We propose semantic atomicity, a generalization of atomicity with respect to a programmer-defined notion of equivalent behavior. We propose an assertion framework in which a programmer can use bridge predicates to specify noninterference properties at the level of abstraction of their application. Further, we propose a novel algorithm for systematically testing atomicity specifications on parallel executions with a bounded number of interruptions-i.e. atomic blocks whose execution is interleaved with that of other threads. We further propose a set of sound heuristics and optional user annotations that increase the efficiency of checking atomicity specifications in the common case where the specifications hold.; We have implemented our assertion framework for specifying and checking semantic atomicity for parallel Java programs, and we have written semantic atomicity specifications for a number of benchmarks. We found that using bridge predicates allowed us to specify the natural and intended atomic behavior of a wider range of programs than did previous approaches. Further, in checking our specifications, we found several previously unknown bugs, including in the widely-used java.util.concurrent library.
机译:实际上,由于并行线程之间可能会发生意料之外的不确定性干扰,因此编写正确的多线程程序非常困难。这样的程序的基本正确性是原子性-如果程序的任何并行执行都具有相同的整体程序行为,并且该程序块是串行执行的,则程序中的代码块是原子的。我们提出了语义原子性,即原子性相对于程序员定义的等效行为概念的概括。我们提出了一个断言框架,程序员可以在该断言框架中使用桥接谓词在其应用程序抽象级别指定非干扰属性。此外,我们提出了一种新颖的算法,用于以有限数量的中断(即执行与其他线程的执行交错​​的原子块。我们进一步提出了一套声音试探法和可选的用户注释,以提高在符合规范的情况下检查原子性规范的效率。我们已经实现了用于指定和检查并行Java程序的语义原子性的断言框架,并且为许多基准编写了语义原子性规范。我们发现,使用桥谓词使我们可以指定比以前的方法更广泛的程序的自然和预期的原子行为。此外,在检查我们的规范时,我们发现了多个以前未知的错误,包括在广泛使用的java.util.concurrent库中。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号