首页> 外文期刊>Computer architecture news >Applying Transactional Memory to Concurrency Bugs
【24h】

Applying Transactional Memory to Concurrency Bugs

机译:将事务性内存应用于并发错误

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

摘要

Multithreaded programs often suffer from synchronization bugs such as atomicity violations and deadlocks. These bugs arise from complicated locking strategies and ad hoc synchronization methods to avoid the use of locks. A survey of the bug databases of major open-source applications shows that concurrency bugs often take multiple fix attempts, and that fixes often introduce yet more concurrency bugs. Transactional memory (TM) enables programmers to declare regions of code atomic without specifying a lock and has the potential to avoid these bugs. Where most previous studies have focused on using TM to write new programs from scratch, we consider its utility in fixing existing programs with concurrency bugs. We therefore investigate four methods of using TM on three concurrent programs. Overall, we find that 29% of the bugs are not fixable by transactional memory, showing that TM does not address many important types of concurrency bugs. In particular, TM works poorly with extremely long critical sections and with deadlocks involving both condition variables and I/O. Conversely, we find that for 56% of the bugs, transactional memory offers demonstrable value by simplifying the reasoning behind a fix or the effort to implement a fix, and using transactions in the first place would have avoided 71 % of the bugs examined. We also find that ad hoc synchronization put in place to avoid the overhead of locking can be greatly simplified with TM, but requires hardware support to perform well.
机译:多线程程序经常遭受同步错误,例如原子性违规和死锁。这些错误是由复杂的锁定策略和临时同步方法(避免使用锁定)引起的。对主要的开源应用程序的错误数据库进行的一项调查显示,并发错误通常需要进行多次修复,并且该修复通常会引入更多并发错误。事务性内存(TM)使程序员可以在不指定锁的情况下声明原子代码区域,并有可能避免这些错误。在以前的大多数研究都集中在使用TM从头开始编写新程序的地方,我们认为它在修复具有并发错误的现有程序方面的效用。因此,我们研究了在三个并发程序上使用TM的四种方法。总体而言,我们发现29%的错误无法通过事务内存修复,这表明TM不能解决许多重要的并发错误类型。特别是,TM在极长的关键部分以及涉及条件变量和I / O的死锁方面表现不佳。相反,我们发现,对于56%的错误,事务性内存通过简化修补程序背后的原因或实施修补程序的努力而提供了可证明的价值,并且首先使用事务处理可以避免71%的漏洞被检查。我们还发现,使用TM可以大大简化为避免锁定开销而进行的即席同步,但是需要硬件支持才能正常运行。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号