Modelling race conditions in multithreading programs in terms of Petri nets

Author:

Kharitonov D I,Odyakova D S

Abstract

Abstract The article describes an approach to detecting race conditions with respect to a variable in a program, based on the automatic construction of a program model in terms of Petri nets. A simple sample program having race condition is given and the analysis of its behavior shows four different results of execution due to the race condition. Compositional model of the program in terms of Petri nets is presented that illustrates the process of automatic model generation. Notions of program control flow, global area and environment models are introduced. Reduction rules for the control flow model are defined and compositional representation of reduced program model is described. The formula for detection of race conditions is defined as: for a race conditions to occur, it is necessary that between the moment a variable is read by a thread and the moment this thread writes to a variable, an event of writing to the variable by another thread may occur. Compositional model of global variable capable of intercepting writing to variable events that lead to race condition is presented. By synchronizing the program control flow model with the global variable model it is possible to detect race conditions by building the reachability tree and checking for the presence of error event in it.

Publisher

IOP Publishing

Subject

General Medicine

Reference9 articles.

1. Data race avoidance and replay scheme for developing and debugging parallel programs on distributed shared memory systems;Chiu;Parallel Comput.,2011

2. The Application of Coloured Petri Nets to Verification of Distributed Systems Specified by Message Sequence Charts;Chernenok;Proc. Spring/Summer Young Researchers’ Colloquium on Software Engineering,2015

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3