摘要
DotNet环境对多线程技术提供了良好的支持,对于分布式离散事件,多线程技术能够以最少代价、最便捷的方式实现其并发活动的仿真。异步多线程仿真编程中的主要问题是线程的引入与控制、对各结点间的仿真时钟同步问题、线程间活动的同步与消息传递、临界变量的访问与保护机制等。从系统实现角度对这些问题进行分析是建模的必要条件。本文进一步讨论了各结点间通过消息交互的加工过程,最后以控制台方式将分布式离散事件仿真中的主要关键活动编程实现。通过对仿真实现全过程的讨论可以看出,多线程技术能够有效地实现分布式并发离散事件的仿真。
The DotNet environment can achieve the distributed discrete events simulation with the least efforts. The main problem of multithreads programming is the manipulation and control of the threads, the synchronization with a simulation clock, the message transfer and the critical variant protection. The paper discusses these problems with a distributed machining task. And finally a console type program is developed with the Microsoft visual C# language. The paper expatiates the process of realizing the simulation almost all around.
出处
《计算机工程与科学》
CSCD
2007年第7期96-101,109,共7页
Computer Engineering & Science
基金
国家自然科学基金资助项目(70271029)
湖北省人文社科基地-现代信息管理研究中心资助
关键词
分布式
UML
并发离散事件
多线程编程
模拟时钟同步
distributed
UML
discrete events
multithreads programming
analog clock synchronization