计算机科学与探索
計算機科學與探索
계산궤과학여탐색
JOURNAL OF FRONTIERS OF COMPUTER SCIENCE & TECHNOLOGY
2015年
8期
914-925
,共12页
陈园军%石浚菁%王林章%李宣东
陳園軍%石浚菁%王林章%李宣東
진완군%석준정%왕림장%리선동
中断%竞争%嵌入式系统%中断驱动%测试
中斷%競爭%嵌入式繫統%中斷驅動%測試
중단%경쟁%감입식계통%중단구동%측시
interrupt%race%embedded system%interrupt-driven%testing
中断驱动的嵌入式系统广泛应用于对安全和稳定性要求极高的领域,但因系统设计复杂,运行环境多样等原因,中断不确定性导致的严重故障时有发生,数据竞争是较为棘手的问题之一。已有工作对中断导致的数据竞争检测做了许多尝试,但目前还没有比较易用的解决方案。为了解决这类问题,提出了一种基于控制流图的静态检测方法。该方法通过对源程序进行预处理分析,检测出程序中使用的共享资源和中断使能操作;根据预处理的结果,构建出源程序对应的简要控制流图;通过对简要控制流图的抢占关系分析,得到可能会导致竞争关系的执行序列。实验结果表明,该方法能有效检测出程序中潜在的竞争关系,并指明该潜在竞争的发生路径,帮助软件测试人员对故障进行确认和修复。
中斷驅動的嵌入式繫統廣汎應用于對安全和穩定性要求極高的領域,但因繫統設計複雜,運行環境多樣等原因,中斷不確定性導緻的嚴重故障時有髮生,數據競爭是較為棘手的問題之一。已有工作對中斷導緻的數據競爭檢測做瞭許多嘗試,但目前還沒有比較易用的解決方案。為瞭解決這類問題,提齣瞭一種基于控製流圖的靜態檢測方法。該方法通過對源程序進行預處理分析,檢測齣程序中使用的共享資源和中斷使能操作;根據預處理的結果,構建齣源程序對應的簡要控製流圖;通過對簡要控製流圖的搶佔關繫分析,得到可能會導緻競爭關繫的執行序列。實驗結果錶明,該方法能有效檢測齣程序中潛在的競爭關繫,併指明該潛在競爭的髮生路徑,幫助軟件測試人員對故障進行確認和脩複。
중단구동적감입식계통엄범응용우대안전화은정성요구겁고적영역,단인계통설계복잡,운행배경다양등원인,중단불학정성도치적엄중고장시유발생,수거경쟁시교위극수적문제지일。이유공작대중단도치적수거경쟁검측주료허다상시,단목전환몰유비교역용적해결방안。위료해결저류문제,제출료일충기우공제류도적정태검측방법。해방법통과대원정서진행예처리분석,검측출정서중사용적공향자원화중단사능조작;근거예처리적결과,구건출원정서대응적간요공제류도;통과대간요공제류도적창점관계분석,득도가능회도치경쟁관계적집행서렬。실험결과표명,해방법능유효검측출정서중잠재적경쟁관계,병지명해잠재경쟁적발생로경,방조연건측시인원대고장진행학인화수복。
Interrupt-driven embedded systems are widely used in very high reliable and stable fields. However, due to the design complexity and the running environment diversity, uncertain interrupt faults often happen, which cause serious consequence. Data race is one of these complex problems. Lots of work has been done to detect such races, but there is still no easy solution. To solve such problems, this paper introduces a static detection method based on control flow graph. Firstly this method detects the shared resources and interrupts in the source code by preprocessing, and then constructs the corresponding simple control flow graphs according to the preprocessing result. Secondly the method points out the potential data races and their execution paths by analyzing the preemption relationship on these control flow graphs. The experimental results show that this method can not only detect the data race problems in the code, but also trace and show their execution paths, which is quite helpful for the bug verification and fix.