首页> 外文学位 >Cooperability: A new property for multithreading.
【24h】

Cooperability: A new property for multithreading.

机译:协作性:多线程的新属性。

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

摘要

Multithreading is a prominent technique that enables software to effectively utilize multiple cores on modern hardware. Unfortunately, multithreading is challenging to use properly, as problems like race conditions and atomicity violations are easy to create yet difficult to find and fix. These anomalies are all due to unintended thread interference, in which the actions of one thread are influenced in an unexpected way by the actions of another thread. The typical result of unintended thread interference is unreliable software that is prone to exhibit irreproducible errors.;We present an approach in which all program points susceptible to thread interference are documented with a lightweight specification called a yield annotation. This correctness property is called cooperability. Cooperability guarantees that a program's behavior under a preemptive scheduler (context switching at any program point) is equivalent to that under a cooperative scheduler (context switching only at yields).;With this approach, the hard problem of determining multithreaded program correctness decomposes into two simpler subproblems: • Cooperative correctness. Is the program correct under a cooperative scheduler? • Ensuring cooperability. Are all thread interference points documented via yield? In other words, if a program is correct under a cooperative scheduler, and satisfies cooperability, then the same program is correct under a preemptive scheduler. Hence yield annotations enable cooperative reasoning while preserving runtime behavior.;We demonstrate program analysis techniques to mechanically verify cooperability. These techniques work either at compile time or at runtime. We also describe a tool to automatically infer yield annotations for un-annotated programs.;Cooperative correctness is much simpler than the original correctness problem. The use of a cooperative scheduler allows us to leverage these desirable properties: • Sequential reasoning is correct by default, except at yields. • Yields are the only place to examine for unintended thread interference.;Experimental results on standard benchmarks demonstrate that the number of yield annotations required is quite low -- just 13 yields per thousand lines of code. Yields can help find concurrency bugs: over our benchmarks, unintended yields identify known race conditions and atomicity violations. Finally, a preliminary user study shows that yield annotations are correlated with a statistically significant improvement in the ability of programmers to identify concurrency bugs.
机译:多线程是一项杰出的技术,它使软件能够有效利用现代硬件上的多个内核。不幸的是,多线程难以正确使用,因为诸如竞争条件和原子违反之类的问题很容易产生,但很难查找和解决。这些异常都是由于意外的线程干扰造成的,其中一个线程的操作受到另一线程的操作的意外影响。意外线程干扰的典型结果是不可靠的软件,该软件易于表现出无法再现的错误。我们提出了一种方法,其中所有易受线程干扰的程序点都用一个称为yield注解的轻量级规范进行记录。这种正确性称为协作性。合作性保证了抢占式调度程序下的程序行为(在任何程序点的上下文切换)与协作式调度程序下的行为(仅在yield上的上下文切换)是等效的;使用这种方法,确定多线程程序正确性的困难问题分解为两个更简单的子问题:•合作的正确性。在合作调度程序下程序是否正确? •确保合作性。是否通过yield记录了所有线程干扰点?换句话说,如果一个程序在协作调度程序下是正确的,并且满足协作性,则同一程序在抢占式调度程序下是正确的。因此,收益注释可在保持运行时行为的同时启用协作推理。;我们演示了程序分析技术,以机械方式验证协作性。这些技术在编译时或运行时都有效。我们还描述了一种为未注释的程序自动推断出产量注释的工具。合作的正确性比原始的正确性问题要简单得多。使用协作调度程序可以使我们利用以下理想属性:•默认情况下,顺序推理是正确的,但收益率除外。 •Yields是检查意外线程干扰的唯一地方。;基于标准基准的实验结果表明,所需的yield注释的数量非常少-每千行代码只有13个yields。收益率可以帮助发现并发错误:在我们的基准测试中,意外收益率可识别已知的竞争条件和原子性违规。最后,一项初步的用户研究表明,收益注释与程序员识别并发错误的能力在统计上的显着提高相关。

著录项

  • 作者

    Yi, Jaeheon.;

  • 作者单位

    University of California, Santa Cruz.;

  • 授予单位 University of California, Santa Cruz.;
  • 学科 Computer Science.
  • 学位 Ph.D.
  • 年度 2011
  • 页码 222 p.
  • 总页数 222
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号