首页> 外文会议>7th ACM SIGPLAN workshop on types in language design and implementation 2011 >A Type and Effect System for Deadlock Avoidance in Low-level Languages
【24h】

A Type and Effect System for Deadlock Avoidance in Low-level Languages

机译:一种避免使用低级语言的死锁的类型和效果系统

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

摘要

The possibility to run into a deadlock is an annoying and commonly occurring hazard associated with the concurrent execution of programs. In this paper we present a polymorphic type and effect system that can be used to dynamically avoid deadlocks, guided by information about the order of lock and unlock operations which is computed statically. In contrast to most other type-based approaches to deadlock freedom, our system does not insist that programs adhere to a strict lock acquisition order or use locking primitives in a block-structured way. Lifting these restrictions is primarily motivated by our desire to target low-level languages, such as C with pthreads, but it also allows our system to be directly applicable in optimizing compilers for high-level languages, such as Java. To show the effectiveness of our approach, we have also developed a tool that uses static analysis to instrument concurrent programs written in C/pthreads and then links these programs with a run-time system that avoids possible deadlocks. Although our tool is still in an early development stage, in the sense that currently its analysis only handles a limited class of programs, our benchmark results are very promising: they show that it is not only possible to avoid all deadlocks with a small run-time overhead, but also often achieve better throughput in highly concurrent programs by naturally reducing lock contention.
机译:陷入僵局的可能性是与程序并发执行相关的烦人且常见的危险。在本文中,我们介绍了一个多态类型和效果系统,该系统可用于以静态方式计算的有关锁定和解锁操作顺序的信息来动态避免死锁。与大多数其他基于类型的死锁自由方法相反,我们的系统不坚持程序遵守严格的锁获取顺序或以块结构的方式使用锁原语。解除这些限制的主要动机是我们希望针对低级语言(例如带有pthread的C),但是它也允许我们的系统直接适用于优化高级语言(例如Java)的编译器。为了展示我们方法的有效性,我们还开发了一种工具,该工具使用静态分析来检测用C / pthreads编写的并发程序,然后将这些程序与运行时系统链接,从而避免可能的死锁。尽管我们的工具仍处于早期开发阶段,从某种意义上说,目前它的分析只能处理有限的一类程序,但是我们的基准测试结果非常有前途:它们表明,不仅可以避免小范围运行的所有僵局,时间开销,但通常也可以通过自然减少锁争用在高并发程序中实现更好的吞吐量。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号