首页> 中文期刊> 《计算机与现代化》 >基于线程调度顺序控制的多线程程序测试

基于线程调度顺序控制的多线程程序测试

         

摘要

随着多核技术越来越普及,多线程程序的编程也越来越流行.但是多线程程序的正确性问题已经严重影响软件可靠性,且现有的测试技术不能很好地满足多线程程序的需求.本文重点研究多线程程序中最常见的一种bug,即数据竞争,提出一种基于线程调度顺序控制的测试方法.该方法混合静态方法和动态方法,能够有效地找到多线程程序中存在的数据竞争,且能够区分出哪些数据竞争是有害的,需要程序员优先修复.实验结果显示,对于数据竞争的触发概率,本文的方法使其平均从0.53%提高到79.2%,且本文所引入的运行时开销平均只有80%,与相关方法所引入370%的开销相比更优.%As multi-core techniques become pervasive, programming multithreaded programs is becoming popular. However, the problem of correctness of multithreaded program has affected software reliability severely. Moreover, current testing techniques can not satisfy the requirements of multithreaded programs. This paper focuses on the most common type of bugs in multithread programs, which is called data race. We propose a testing approach based on controlling sequence of thread schedule, combining static approach with dynamic approach. The approach can effectively find the data races in multithreaded programs, and identify the harmful data races that are required to be fixed urgently. Experimental results show that our approach improves the probability of triggering data races significantly, from 0. 53% to 79. 2% averagely. Moreover, the runtime overhead imposed by our approach is on average 80%, and the overhead imposed by related approach is 370%, demonstrating our approach is better.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号