当前位置:主页 > 科技论文 > 软件论文 >

并发程序中的潜在死锁检测与调试

发布时间:2018-04-06 01:24

  本文选题:并发程序 切入点:潜在死锁 出处:《华中科技大学》2016年硕士论文


【摘要】:随着多核硬件的不断普及,并发程序编程的使用也越来越频繁,如何解决并发程序中出现的错误也越来越受到人们关注。在并发程序执行过程中,由于线程调度的随机性,使得人们对并发调试技术有了更高的要求。本文主要实现了一种新的方法用于检测并发程序中是否存在潜在死锁。如果程序在某次执行过程中没有发生死锁,但是存在一条特定的调度序列,程序按照此调度序列执行必定会发生死锁,就称该程序存在潜在死锁。这条特定的调度序列就称为潜在死锁调度序列。潜在死锁分析主要是在并发程序执行没有发生死锁的前提下,通过对记录的执行序列进行分析,判断程序是否存在潜在死锁。如果检测到程序存在潜在死锁,那么就需要进行路径合成来验证潜在死锁分析的准确性。路径合成就是以潜在死锁分析的结果为基础,合成出一条新的执行序列,改变线程之间的调度顺序,控制程序的执行流程。这条合成序列本质上就是一条潜在死锁调度序列,程序按照此合成序列执行必定会发生死锁。当检测到程序存在潜在死锁之后,还需要规避死锁的发生,解决程序中存在的潜在死锁问题。因此设计了一个潜在死锁辅助调试工具。通过该辅助调试工具,调试人员可以获取与潜在死锁相关的线程和互斥锁信息,同时还可以迅速定位到与潜在死锁相关的操作在并发程序中的具体位置。最后可以帮助调试人员解决并发程序中的潜在死锁问题。
[Abstract]:With the increasing popularity of multi-core hardware, the use of concurrent program programming is becoming more and more frequent, and how to solve the errors in concurrent programs has attracted more and more attention.Due to the randomness of thread scheduling in the process of concurrent program execution, people have higher requirements for concurrent debugging technology.In this paper, we mainly implement a new method to detect the potential deadlock in concurrent programs.If a program does not have a deadlock in a certain execution process, but there is a specific scheduling sequence, the program must have a deadlock to execute according to this scheduling sequence, so it is said that the program has a potential deadlock.This particular scheduling sequence is called a potential deadlock scheduling sequence.Potential deadlock analysis is to determine whether there is a potential deadlock in the program by analyzing the execution sequence of the record without deadlock occurring in the execution of concurrent programs.If there is a potential deadlock in the program, path composition is needed to verify the accuracy of the potential deadlock analysis.Path composition is to synthesize a new execution sequence based on the result of potential deadlock analysis, to change the scheduling order between threads, and to control the execution flow of the program.This synthetic sequence is essentially a potential deadlock scheduling sequence according to which the program must have deadlock.After detecting the existence of potential deadlock in the program, it is necessary to avoid the occurrence of deadlock and solve the potential deadlock problem in the program.Therefore, a potential deadlock assist debugging tool is designed.With this tool, the debugger can obtain the thread and mutex information related to the potential deadlock, and at the same time can quickly locate the specific position of the operation related to the potential deadlock in the concurrent program.Finally, it can help the debugger to solve the potential deadlock problem in concurrent programs.
【学位授予单位】:华中科技大学
【学位级别】:硕士
【学位授予年份】:2016
【分类号】:TP311.11

【参考文献】

相关期刊论文 前3条

1 黄国睿;张平;魏广博;;多核处理器的关键技术及其发展趋势[J];计算机工程与设计;2009年10期

2 吴丹;傅秀芬;苏磊;林乔捷;;多线程编程模型的研究与应用[J];广东工业大学学报;2008年01期

3 朱丽莉,焦素云,周丽娟;基于资源分配图的死锁检测算法的改进[J];情报科学;2000年05期



本文编号:1717357

资料下载
论文发表

本文链接:https://www.wllwen.com/kejilunwen/ruanjiangongchenglunwen/1717357.html


Copyright(c)文论论文网All Rights Reserved | 网站地图 |

版权申明:资料由用户04a21***提供,本站仅收录摘要或目录,作者需要删除请E-mail邮箱bigeng88@qq.com