Atomic invariants verification and deadlock detection at compile-time

Ionut Tamas, I. Salomie, Marcel Antal
{"title":"Atomic invariants verification and deadlock detection at compile-time","authors":"Ionut Tamas, I. Salomie, Marcel Antal","doi":"10.1109/ICCP.2018.8516602","DOIUrl":null,"url":null,"abstract":"Modern systems must take full advantage of the underlying hardware paradigms in order to yield higher throughput and lower latency. A common way of maximizing the hardware usage in a system is by leveraging multithreaded techniques. These techniques however are very hard to reason by and can yield hard to detect bugs, such as deadlocks, livelocks or race conditions from unwanted interleavings of threads in the system's execution. Atomic locks are a standard mechanism to provide a safe way to alleviate such issues by specifying what regions of code need to be executed atomically such that regardless of the threads interleavings the shared memory remains in a consistent state and makes the code execution as a simple serial execution that easy to analyze and reason by, yielding increased programmer productivity and system efficiency. Our paper proposes a system that allows user to easily verify if a C# codebase has correctly implemented the way shared memory (field or properties) are modified and is able to detect race conditions or deadlocks for the specified shared memory. The main goal is to improve developer productivity and to improve the system codebase by specifying the atomicity constraints as unit or integration tests. We present the overall architecture of the system and how it detects the way certain atomic invariants are checked and deadlocks are identified, as well as the integration with an existing codebase. We also describe how the system proves correctness in checking these invariants. We have verified our system against multithreaded C# codebases and the system successfully checks the atomicity invariants and deadlock cases outputting the correct scenarios of how these can happen. We have also provided a way to decrease the risk of concurrency bugs regressions and improving the code quality, thus proving that our system achieves the proposed goals of providing a way for increased developer productivity, correct detection of deadlocks, atomic invariants checking and concurrency bugs mitigation.","PeriodicalId":259007,"journal":{"name":"2018 IEEE 14th International Conference on Intelligent Computer Communication and Processing (ICCP)","volume":" 6","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2018 IEEE 14th International Conference on Intelligent Computer Communication and Processing (ICCP)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICCP.2018.8516602","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Modern systems must take full advantage of the underlying hardware paradigms in order to yield higher throughput and lower latency. A common way of maximizing the hardware usage in a system is by leveraging multithreaded techniques. These techniques however are very hard to reason by and can yield hard to detect bugs, such as deadlocks, livelocks or race conditions from unwanted interleavings of threads in the system's execution. Atomic locks are a standard mechanism to provide a safe way to alleviate such issues by specifying what regions of code need to be executed atomically such that regardless of the threads interleavings the shared memory remains in a consistent state and makes the code execution as a simple serial execution that easy to analyze and reason by, yielding increased programmer productivity and system efficiency. Our paper proposes a system that allows user to easily verify if a C# codebase has correctly implemented the way shared memory (field or properties) are modified and is able to detect race conditions or deadlocks for the specified shared memory. The main goal is to improve developer productivity and to improve the system codebase by specifying the atomicity constraints as unit or integration tests. We present the overall architecture of the system and how it detects the way certain atomic invariants are checked and deadlocks are identified, as well as the integration with an existing codebase. We also describe how the system proves correctness in checking these invariants. We have verified our system against multithreaded C# codebases and the system successfully checks the atomicity invariants and deadlock cases outputting the correct scenarios of how these can happen. We have also provided a way to decrease the risk of concurrency bugs regressions and improving the code quality, thus proving that our system achieves the proposed goals of providing a way for increased developer productivity, correct detection of deadlocks, atomic invariants checking and concurrency bugs mitigation.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
编译时的原子不变量验证和死锁检测
现代系统必须充分利用底层硬件范例,以产生更高的吞吐量和更低的延迟。最大化系统中硬件使用的一种常见方法是利用多线程技术。然而,这些技术非常难以推理,并且可能产生难以检测的bug,例如死锁、活动锁或系统执行中不必要的线程交错造成的竞争条件。原子锁是一种标准机制,它提供了一种安全的方式来缓解这类问题,通过指定需要自动执行代码的哪些区域,这样无论线程如何交错,共享内存都保持一致状态,并使代码执行作为简单的串行执行,易于分析和推理,从而提高程序员的生产力和系统效率。我们的论文提出了一个系统,使用户可以很容易地验证c#代码库是否正确地实现了共享内存(字段或属性)的修改方式,并能够检测指定共享内存的竞争条件或死锁。主要目标是通过将原子性约束指定为单元或集成测试来提高开发人员的工作效率和改进系统代码库。我们介绍了系统的整体架构,以及它如何检测检查某些原子不变量和识别死锁的方式,以及与现有代码库的集成。我们还描述了系统如何证明检查这些不变量的正确性。我们已经针对多线程c#代码库验证了我们的系统,系统成功地检查了原子不变量和死锁情况,并输出了这些情况如何发生的正确场景。我们还提供了一种降低并发bug回归风险和提高代码质量的方法,从而证明我们的系统实现了提高开发人员生产力、正确检测死锁、原子不变量检查和减少并发bug的建议目标。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
A Deep Learning Approach For Pedestrian Segmentation In Infrared Images Real-Time Temporal Frequency Detection in FPGA Using Event-Based Vision Sensor Miniature Autonomous Vehicle Development on Raspberry Pi NEARBY Platform: Algorithm for Automated Asteroids Detection in Astronomical Images CoolCloudSim: Integrating Cooling System Models in CloudSim
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1