作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2008, Vol. 34 ›› Issue (23): 50-52. doi: 10.3969/j.issn.1000-3428.2008.23.019

• 软件技术与数据库 • 上一篇    下一篇

基于Petri网并行程序通信死锁的检测和预防

崔焕庆,刘 强   

  1. (山东科技大学信息科学与工程学院,青岛 266510)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2008-12-05 发布日期:2008-12-05

Detection and Prevention of Communication Deadlock for Parallel Programs Based on Petri Net

CUI Huan-qing, LIU Qiang   

  1. (College of Information Science and Engineering, Shandong University of Science and Technology, Qingdao 266510)
  • Received:1900-01-01 Revised:1900-01-01 Online:2008-12-05 Published:2008-12-05

摘要: 无死锁是并行程序正确性的主要条件之一,已有研究成果关注于死锁检测,但对死锁预防研究较少。该文在对消息传递模式并行程序各种通信过程进行分类介绍的基础上,借助Petri网进行建模,提出程序死锁与Petri网死标识的对应关系,给出通信死锁检测算法,进而针对2种引起通信死锁的原因提出了3种预防方法,通过比较提出最佳方案。该方法既有较好的通用性,又可用于并行算法设计阶段的死锁预防以提高并行编程效率。

关键词: 消息传递, 通信死锁, Petri网, 死锁预防

Abstract: A parallel program should be deadlock-free to assure correct, but most of researches are focused on deadlock detection while few on deadlock prevention. Based on the classification of communication procedures of message-passing parallel programs, they are modeled by Petri nets, and the correspondence between program’s deadlock and Petri net’s dead marking is given. Two kinds of reason leading to deadlock are analyzed and an algorithm is provided to detect the deadlock, and three methods of deadlock prevention are presented with comparison to achieve the best one. The given method not only is useful for all message-passing parallel programs, but also can improve the programming efficiency with pre-verification.

Key words: message-passing, communication deadlock, Petri net, deadlock prevention

中图分类号: