并發(fā)程序中的潛在死鎖檢測(cè)與調(diào)試
發(fā)布時(shí)間:2018-04-06 01:24
本文選題:并發(fā)程序 切入點(diǎn):潛在死鎖 出處:《華中科技大學(xué)》2016年碩士論文
【摘要】:隨著多核硬件的不斷普及,并發(fā)程序編程的使用也越來(lái)越頻繁,如何解決并發(fā)程序中出現(xiàn)的錯(cuò)誤也越來(lái)越受到人們關(guān)注。在并發(fā)程序執(zhí)行過(guò)程中,由于線程調(diào)度的隨機(jī)性,使得人們對(duì)并發(fā)調(diào)試技術(shù)有了更高的要求。本文主要實(shí)現(xiàn)了一種新的方法用于檢測(cè)并發(fā)程序中是否存在潛在死鎖。如果程序在某次執(zhí)行過(guò)程中沒(méi)有發(fā)生死鎖,但是存在一條特定的調(diào)度序列,程序按照此調(diào)度序列執(zhí)行必定會(huì)發(fā)生死鎖,就稱(chēng)該程序存在潛在死鎖。這條特定的調(diào)度序列就稱(chēng)為潛在死鎖調(diào)度序列。潛在死鎖分析主要是在并發(fā)程序執(zhí)行沒(méi)有發(fā)生死鎖的前提下,通過(guò)對(duì)記錄的執(zhí)行序列進(jìn)行分析,判斷程序是否存在潛在死鎖。如果檢測(cè)到程序存在潛在死鎖,那么就需要進(jìn)行路徑合成來(lái)驗(yàn)證潛在死鎖分析的準(zhǔn)確性。路徑合成就是以潛在死鎖分析的結(jié)果為基礎(chǔ),合成出一條新的執(zhí)行序列,改變線程之間的調(diào)度順序,控制程序的執(zhí)行流程。這條合成序列本質(zhì)上就是一條潛在死鎖調(diào)度序列,程序按照此合成序列執(zhí)行必定會(huì)發(fā)生死鎖。當(dāng)檢測(cè)到程序存在潛在死鎖之后,還需要規(guī)避死鎖的發(fā)生,解決程序中存在的潛在死鎖問(wèn)題。因此設(shè)計(jì)了一個(gè)潛在死鎖輔助調(diào)試工具。通過(guò)該輔助調(diào)試工具,調(diào)試人員可以獲取與潛在死鎖相關(guān)的線程和互斥鎖信息,同時(shí)還可以迅速定位到與潛在死鎖相關(guān)的操作在并發(fā)程序中的具體位置。最后可以幫助調(diào)試人員解決并發(fā)程序中的潛在死鎖問(wèn)題。
[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.
【學(xué)位授予單位】:華中科技大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2016
【分類(lèi)號(hào)】:TP311.11
【參考文獻(xiàn)】
相關(guān)期刊論文 前3條
1 黃國(guó)睿;張平;魏廣博;;多核處理器的關(guān)鍵技術(shù)及其發(fā)展趨勢(shì)[J];計(jì)算機(jī)工程與設(shè)計(jì);2009年10期
2 吳丹;傅秀芬;蘇磊;林喬捷;;多線程編程模型的研究與應(yīng)用[J];廣東工業(yè)大學(xué)學(xué)報(bào);2008年01期
3 朱麗莉,焦素云,周麗娟;基于資源分配圖的死鎖檢測(cè)算法的改進(jìn)[J];情報(bào)科學(xué);2000年05期
,本文編號(hào):1717357
本文鏈接:http://sikaile.net/kejilunwen/ruanjiangongchenglunwen/1717357.html
最近更新
教材專(zhuān)著