期刊文献+

哲学家就餐问题的算法实现 被引量:1

Implementation of an algorithm for the dining philosophers problem
下载PDF
导出
摘要 针对哲学家就餐问题这一操作系统中进程间通信的经典范例,设计了该范例的一个具有代表性的算法的技术实现方案。方案以Linux操作系统作为运行平台,通过进程而不是线程来体现哲学家的并发行为特征,以自动和随机相结合的灵活自然的人机交互模式模拟哲学家的状态,控制其状态切换;提出了两种形式的哲学家状态监控程序,它们能够生动、直观、准确地表达出哲学家状态的变化过程。字符形式的监控程序在字符终端和图形终端中均可使用,主要面向以超级终端登录到多用户Linux系统的用户;利用QT5开发的动画形式的监控程序适合在桌面Linux的图形终端中使用。 Aiming at the dining philosophers problem, a well-known classical example of the inter process of communication in the operating system field, this paper designs and presents a technical implementation scheme for a representative algorithm. The scheme takes Linux as its supporting platform, and the scheme reflects the characteristics of the concurrent behaviors of philosophers through processes rather than threads. The state of the philosophers and the switch between two states are emulated and controlled by the combination of automatic and random modes, which is a flexible and natural humancomputer interaction mode. Two forms of state monitoring programs are presented, which can express the state of philosophers in a vivid, direct and accurate way. The character-based monitoring program can be used in both the character terminal and the graphic terminal, and is mainly used for those users who log in the multi-user Linux systems. The animation-based monitoring program is suitable for the desktop Linux users with graphic terminal.
作者 高升 陈月峰
出处 《计算机工程与科学》 CSCD 北大核心 2016年第2期269-276,共8页 Computer Engineering & Science
基金 广东海洋大学卓越计划项目
关键词 操作系统 进程同步与互斥 信号量 共享存储器 哲学家就餐问题 状态监控程序 operating system process synchronization and mutual exclusion semaphore shared memory dining philosophers problem state monitoring program
  • 相关文献

参考文献5

二级参考文献21

  • 1王淑礼,袁俊红,江祥奎.描述与求解哲学家就餐问题的Petri网模型研究[J].信阳师范学院学报(自然科学版),2004,17(4):468-469. 被引量:1
  • 2潘清.实时Unix操作系统发展[J].指挥技术学院学报,1995,6(1):7-15. 被引量:1
  • 3Hach M J 陈葆钰译.UNIX操作系统[M].北京:北京大学出版社,..
  • 4Hwang Kai 王鼎兴译.高级计算机系统结构:并行性、可扩展性、可编程性[M].北京,南宁:清华大学出版社,广西科学技术出版社,..
  • 5Dijkstra E W. Hierarchical Ordering of Sequential Process [J].Acta Informatica(S0001--5903), 1971,1 (2): 115-138.
  • 6Wu Z H, Murata T. A Petri Net Model of A Starvation-free Solution to the Dining Philosophers problem [C]//Proceedings of IEEE Workgroup on Languages for Automation, Chicago, 1983.
  • 7Ramchandni C.. Analysis of Asynchronous Concurrent Systems by Timed Petri Nets[D]. Cambridge, Massachusmts: MIT, Dept. Electrical Engineering, PhD Thesis, 1974.
  • 8David R, Alia H.. Continuous Petri Nets[C]// Proceedings of 8th European Workshop on Application and Theory of Petri Nets, Zaragoza, Spain, 1987: 275 -294.
  • 9Ichikawa A. , Yokoyama K, and Kurogi S. Control of Event-Driven Systems-Reachability and Control of Conflict-Free Petri Nets. Trans[J].Soc. Instrum. Control, Eng. (Japan),1985,21(4):324-330.
  • 10刘关俊,吴哲辉.改进的哲学家进餐问题无饥饿解的Petri网模型[J].系统仿真学报,2007,19(A01):26-28. 被引量:3

共引文献15

同被引文献4

引证文献1

二级引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部