-
哲学家进餐问题是荷兰学者Dijkstra 提出的经典问题之一,它是一个信号量机制问题的应用,在操作系统文化史上具有非常重要的地位。对该问题的剖析有助于学生深刻地...
哲学家进餐问题是荷兰学者Dijkstra 提出的经典问题之一,它是一个信号量机制问题的应用,在操作系统文化史上具有非常重要的地位。对该问题的剖析有助于学生深刻地理解计算机系统中的资源共享、进程同步、死锁等问题,并能熟练地应用信号量来解决生活中的控制流程,即将生活中的控制流程用形式化的方式表达出来。
假设有5个哲学家,他们花费一生中的时光思考和吃饭。这些哲学家共用一个圆桌,每个哲学家都有一把椅子。在桌子中央是一碗通心面,在桌子上放着5只筷子。(如图所示)当一个哲学家思考时,他与其他同事不交互。时而,哲学家会感到饥饿,并试图拿起与他相近的两只筷子(他与邻近左、右之间的筷子)。一个哲学家一次只能拿起一只筷子。显然,他不能从其他哲学家手里拿走筷子。当一个饥饿的哲学家同时有两只筷子时,他就不能不用释放他的筷子而自己吃了。当吃完后,他会放下两只筷子,并再次开始思考。
规定奇数号哲学家先拿他左边的筷子,然后再去拿右边的筷子;而偶数号哲学家则相反。按此规定,将是1、 2号哲学家竞争1号筷子;3、4号哲学家竞争3号筷子。即五位哲学家都先竞争奇数号筷子,获得后,再去竞争偶数号筷子,最后总会有一位哲学家能获得两只筷子而进餐。
-dining philosophers problem is the Netherlands scholars Dijkstra"s one of the classic, It is a signal to the mechanism of application, the operating system in the history of culture has a very important position. Analysis of the problem to help students understand deeply the computer system resource sharing, process synchronization, and other issues Deadlock, skilled and can be applied to solve the signal volume life of the control flow, about the life of the control flow w
- 2022-02-12 04:28:55下载
- 积分:1
-
supermarket management system, is not her own writing. VB examples of integrity
超市管理系统,不是自己写的。
完整的VB实例-supermarket management system, is not her own writing. VB examples of integrity
- 2023-02-10 15:10:03下载
- 积分:1
-
北大教授张抿讲授应用栈实现从递归到非递归的转换,机制十分灵巧...
北大教授张抿讲授应用栈实现从递归到非递归的转换,机制十分灵巧-taught purse up from the application stack realization of the non- recursive recursive conversion, a very ingenious mechanism
- 2022-03-06 12:29:15下载
- 积分:1
-
餐饮经销系统,安装及源代码
餐饮经销系统,安装及源代码-Food distribution systems, installation and the source code
- 2022-03-22 07:47:14下载
- 积分:1
-
学籍管理系统源程序本系统全称为学籍管理系统。是一典型的信息管理系统。通过系统的分析和设计,解决了不同学校学生信息的综合管理。本系统以vb为基本框架,提供了基本的...
学籍管理系统源程序本系统全称为学籍管理系统。是一典型的信息管理系统。通过系统的分析和设计,解决了不同学校学生信息的综合管理。本系统以vb为基本框架,提供了基本的学生信息的添加、删除、修改和查询服务。管理系统是典型的管理信息系统(MIS),-School management system known as the source of the system-wide student management system. Is a typical information management system. Through systematic analysis and design to address the different schools of information management. Vb for the system to the basic framework, provides the basic student information to add, delete, modify, and query services. Management system is a typical management information system (MIS),
- 2022-03-30 23:25:18下载
- 积分:1
-
Teoretyczne podstawy informatyki
Teoretyczne podstawy informatyki
- 2022-03-23 19:44:04下载
- 积分:1
-
BCH码的计算。方便对于对于通讯协议的算法并不是很了解的人...
BCH码的计算。方便对于对于通讯协议的算法并不是很了解的人-BCH code calculations. Convenient for the algorithm for the communication protocol is not very understanding person
- 2022-05-06 06:21:03下载
- 积分:1
-
on object
讲述面向对象培训的一本教材,希望对关心这方面的朋友有用-on object-oriented training of a textbook, and I hope to the concern in this regard useful friends
- 2022-09-04 10:10:03下载
- 积分:1
-
上位机通信系统,通过串口实现对下位机的信息收集,并将信息保存到EXCEL中。...
上位机通信系统,通过串口实现对下位机的信息收集,并将信息保存到EXCEL中。-Host computer communication system, through the serial interface for the next crew of the information collection, and the information is saved to the EXCEL。
- 2023-04-19 08:25:03下载
- 积分:1
-
sqlinjection on some advanced applications, the Amoy overseas sites
关于sqlinjection的一些高级应用,国外网站淘的-sqlinjection on some advanced applications, the Amoy overseas sites
- 2023-07-03 18:35:02下载
- 积分:1