计算机工程与应用 ›› 2007, Vol. 43 ›› Issue (35): 108-110.

• 产品、研发、测试 • 上一篇    下一篇

一种新的并行Java程序的监护模型

濮方琍,卢炎生   

  1. 华中科技大学 计算机学院,武汉 430074
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2007-12-11 发布日期:2007-12-11
  • 通讯作者: 濮方琍

New guardian model for concurrent Java programs

PU Fang-li,LU Yan-sheng   

  1. College of Computer Science & Technology,Huazhong University of Science & Technology,Wuhan 430074,China
  • Received:1900-01-01 Revised:1900-01-01 Online:2007-12-11 Published:2007-12-11
  • Contact: PU Fang-li

摘要: 提出了一种新的并行Java程序异常处理的监护模型。该模型针对并行Java程序异步信息传递方式进行异常处理。当并行Java程序的某个线程出现异常时,该线程的监护模块把检测到的异常情况的信息传递到其它线程的监护模块,每个线程根据当前事项与异常事项的向量时钟关系,对当前事项进行回滚或停止操作,以达到对并行Java程序的保护。过去一些并行程序的监护方案是在信息交换的基础上把并行程序结构化为许多原子行为,把多个并行异常当作单个异常进行处理,具有较大的局限性。提出的监护模型是从全局上对并行Java程序的异常情况进行处理,并指导每个线程根据自身情况作出相应反映。实验证明提出的新的并行Java程序监护模型具有较强的实际操作性,并能有效地保护并行Java程序。

关键词: 并行Java程序, 异常, 监护模型, 容错能力

Abstract: This paper presents a new guardian model for exception handling in concurrent programs.The model handles exception in asynchronous processes of concurrent Java programs.When exception occurs in concurrent programs,the guardian module has checked the exception and transfer the exception information to all the threads.Based on the exception status and vector clocks,the threads force the events at present rolling back or stopping running to protect concurrent Java programs.Several guardian models have been proposed in the past.These models are based on structuring concurrent programs as atomic actions based on conversations or transactions and resolving multiple concurrent exceptions into a single one.So they have great limitation.The guardian model that we proposed is a global exception handier and every thread can do something according to the status in it.The case study proves the new guardian model for concurrent Java programs is easier used in practice and can efficiently protect concurrent Java programs.

Key words: concurrent Java program, exception, guardian model, fault tolerance