首页> 外文期刊>Communications of the ACM >Asserting and Checking Determinism for Multithreaded Programs
【24h】

Asserting and Checking Determinism for Multithreaded Programs

机译:声明和检查多线程程序的确定性

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

摘要

The trend towards processors with more and more parallel cores is increasing the need for software that can take advantage of parallelism. The most widespread method for writing parallel software is to use explicit threads. Writing correct multithreaded programs, however, has proven to be quite challenging in practice. The key difficulty is nondetermin-ism. The threads of a parallel application may be interleaved nondeterministically during execution. In a buggy program, nondeterministic scheduling can lead to nondeterministic results-where some interleavings produce the correct result while others do not.rnWe propose an assertion framework for specifying that regions of a parallel program behave deterministically despite nondeterministic thread interleaving. Our framework allows programmers to write assertions involving pairs of program states arisingfrom different parallel schedules. We describe an implementation of our deterministic assertions as a library for Java, and evaluate the utility of our specifications on a number of parallel Java benchmarks. We found specifying deterministic behavior to be quite simple using our assertions. Further, in experiments with our assertions, we were able to identify two races as true parallelism errors that lead to incorrect non-deterministic behavior. These races were distinguished from a number of benign races in the benchmarks.
机译:具有越来越多的并行内核的处理器的趋势正在增加对可以利用并行性的软件的需求。编写并行软件的最广泛的方法是使用显式线程。但是,事实证明,编写正确的多线程程序是非常困难的。关键困难是不确定性。并行应用程序的线程可以在执行期间不确定地交错。在有缺陷的程序中,不确定性调度会导致不确定性结果,其中某些交织会产生正确的结果,而另一些交织不会产生正确的结果。我们提出了一个断言框架,用于指定并行程序区域在不确定性线程交织的情况下仍具有确定性。我们的框架允许程序员编写涉及不同并行调度产生的成对程序状态的断言。我们将确定性断言的实现描述为Java库,并在许多并行Java基准测试中评估规范的实用性。我们发现使用断言指定确定性行为非常简单。此外,在使用我们的断言进行的实验中,我们能够将两个种族识别为真正的并行错误,从而导致错误的不确定性行为。这些种族与基准中的许多良性种族有所区别。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号