自动修复多线程程序与死锁/Livelock使用最大的满意度

Yiyan Lin, S. Kulkarni
{"title":"自动修复多线程程序与死锁/Livelock使用最大的满意度","authors":"Yiyan Lin, S. Kulkarni","doi":"10.1145/2610384.2610398","DOIUrl":null,"url":null,"abstract":"Deadlock-freedom is a major challenge in developing multi-threaded programs, as a deadlock cannot be resolved until one restarts the program (mostly by using manual intervention). To avoid the risk of blocking, a program may use the trylock operations rather than lock operations. In this case, if a thread fails to acquire a lock using trylock, since trylock is non-blocking, the thread can release acquired locks to avoid a deadlock after trylock returns. Although this approach avoids deadlocks, it may also introduce bugs such as livelock and deadlivelock. Moreover, when such bugs are identified in a program, revising the program manually is error-prone. \n With this motivation, in this paper, we propose an approach for avoiding deadlocks, livelocks and deadlivelocks in the given multi-threaded program. In our approach, we first identify cyclic lock dependencies that may lead to deadlocks, livelocks or deadlivelocks. Subsequently, we map the problem of ensuring freedom from deadlocks, livelocks and deadlivelocks to the weighted partial maximum satisfiability problem. To ensure that the repaired program preserves most of original design, our approach attempts to make minimal changes to the original program.","PeriodicalId":20624,"journal":{"name":"Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis","volume":"46 1","pages":"237-247"},"PeriodicalIF":0.0000,"publicationDate":"2014-07-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"37","resultStr":"{\"title\":\"Automatic repair for multi-threaded programs with Deadlock/Livelock using maximum satisfiability\",\"authors\":\"Yiyan Lin, S. Kulkarni\",\"doi\":\"10.1145/2610384.2610398\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Deadlock-freedom is a major challenge in developing multi-threaded programs, as a deadlock cannot be resolved until one restarts the program (mostly by using manual intervention). To avoid the risk of blocking, a program may use the trylock operations rather than lock operations. In this case, if a thread fails to acquire a lock using trylock, since trylock is non-blocking, the thread can release acquired locks to avoid a deadlock after trylock returns. Although this approach avoids deadlocks, it may also introduce bugs such as livelock and deadlivelock. Moreover, when such bugs are identified in a program, revising the program manually is error-prone. \\n With this motivation, in this paper, we propose an approach for avoiding deadlocks, livelocks and deadlivelocks in the given multi-threaded program. In our approach, we first identify cyclic lock dependencies that may lead to deadlocks, livelocks or deadlivelocks. Subsequently, we map the problem of ensuring freedom from deadlocks, livelocks and deadlivelocks to the weighted partial maximum satisfiability problem. To ensure that the repaired program preserves most of original design, our approach attempts to make minimal changes to the original program.\",\"PeriodicalId\":20624,\"journal\":{\"name\":\"Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis\",\"volume\":\"46 1\",\"pages\":\"237-247\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2014-07-21\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"37\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/2610384.2610398\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2610384.2610398","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 37

摘要

避免死锁是开发多线程程序的一个主要挑战,因为死锁只有在重新启动程序(主要是通过使用手动干预)之后才能解决。为了避免阻塞的风险,程序可以使用trylock操作而不是lock操作。在这种情况下,如果线程无法使用trylock获得锁,因为trylock是非阻塞的,线程可以释放获得的锁,以避免在trylock返回后出现死锁。尽管这种方法避免了死锁,但它也可能引入诸如活锁和死锁之类的bug。此外,当在程序中识别出这些错误时,手动修改程序是容易出错的。基于这一动机,在本文中,我们提出了一种在给定多线程程序中避免死锁、活锁和死活锁的方法。在我们的方法中,我们首先确定可能导致死锁、活动锁或死活动锁的循环锁依赖。随后,我们将保证死锁、活锁和死锁的自由问题映射为加权的部分最大可满足性问题。为了确保修复后的程序保留了大部分原始设计,我们的方法试图对原始程序进行最小的更改。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Automatic repair for multi-threaded programs with Deadlock/Livelock using maximum satisfiability
Deadlock-freedom is a major challenge in developing multi-threaded programs, as a deadlock cannot be resolved until one restarts the program (mostly by using manual intervention). To avoid the risk of blocking, a program may use the trylock operations rather than lock operations. In this case, if a thread fails to acquire a lock using trylock, since trylock is non-blocking, the thread can release acquired locks to avoid a deadlock after trylock returns. Although this approach avoids deadlocks, it may also introduce bugs such as livelock and deadlivelock. Moreover, when such bugs are identified in a program, revising the program manually is error-prone. With this motivation, in this paper, we propose an approach for avoiding deadlocks, livelocks and deadlivelocks in the given multi-threaded program. In our approach, we first identify cyclic lock dependencies that may lead to deadlocks, livelocks or deadlivelocks. Subsequently, we map the problem of ensuring freedom from deadlocks, livelocks and deadlivelocks to the weighted partial maximum satisfiability problem. To ensure that the repaired program preserves most of original design, our approach attempts to make minimal changes to the original program.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信