{"title":"Monitoring for deadlocks in Ada tasking","authors":"S. German, D. Helmbold, D. Luckham","doi":"10.1145/3304133.3304136","DOIUrl":null,"url":null,"abstract":"Most high level languages with multiprocessing do not have built in mechanisms to detect deadlocks during program execution. We present transformation rules for taking an original Ada program P and deriving a new program P', such that P' has a potential deadlock iff P does, and P' signals whenever a deadlock is about to occur. In principle, the transformations can be applied mechanically, giving a practical tool for debugging deadlocks. Since this method modifies the source program, it can be used with any implementation of the language, without special knowledge of the implementation of tasking. The transformations that we have developed thus far are sufficient to handle most of the complexities of Ada tasking, including arbitrary task types, conditional entry calls, selective waits, timed entry calls, and intertask exceptions. In the course of this work, we have developed some generally useful source program transformations, such as one to uniformly introduce task identifiers. We have also developed some interesting concurrent algorithms for the deadlock monitoring. An actual monitor program for detecting deadlocks has been implemented in Ada. Our basic approach and monitoring algorithms are applicable to other languages with multiple processes.","PeriodicalId":304626,"journal":{"name":"Proceedings of the AdaTEC Conference on Ada","volume":"10 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1982-10-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"21","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the AdaTEC Conference on Ada","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3304133.3304136","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 21
Abstract
Most high level languages with multiprocessing do not have built in mechanisms to detect deadlocks during program execution. We present transformation rules for taking an original Ada program P and deriving a new program P', such that P' has a potential deadlock iff P does, and P' signals whenever a deadlock is about to occur. In principle, the transformations can be applied mechanically, giving a practical tool for debugging deadlocks. Since this method modifies the source program, it can be used with any implementation of the language, without special knowledge of the implementation of tasking. The transformations that we have developed thus far are sufficient to handle most of the complexities of Ada tasking, including arbitrary task types, conditional entry calls, selective waits, timed entry calls, and intertask exceptions. In the course of this work, we have developed some generally useful source program transformations, such as one to uniformly introduce task identifiers. We have also developed some interesting concurrent algorithms for the deadlock monitoring. An actual monitor program for detecting deadlocks has been implemented in Ada. Our basic approach and monitoring algorithms are applicable to other languages with multiple processes.