-
哲学家进餐问题是荷兰学者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
-
Glomosim-2.3
Glomosim 软件是网络仿真软件,尤其是方便无线网络仿真。我希望它将非常有用。
- 2022-03-29 11:14:35下载
- 积分:1
-
MYSQL5 stored procedure, a detailed manual, non
MYSQL5 存储过程详细手册,非扫描版,希望能对广大学习MYSQL 的朋友有帮助.-MYSQL5 stored procedure, a detailed manual, non-scan version, hoping to learn MYSQL friend of the broad masses of help.
- 2023-01-02 07:25:03下载
- 积分:1
-
一种通过单镜头摄像机来实现行人计数的方法,全英文。
一种通过单镜头摄像机来实现行人计数的方法,全英文。-A single-lens camera to achieve pedestrian counting method, all in English.
- 2023-06-16 23:20:04下载
- 积分:1
-
软件编程,我们公司
软件编程建议,我们公司的内部培训资料,比较有参考价值哦-Software programming, we company
- 2022-06-03 17:12:37下载
- 积分:1
-
根据给出的股票代码清单,实时获取相应的股票价格,根据自己的需要增加分析代码...
根据给出的股票代码清单,实时获取相应的股票价格,根据自己的需要增加分析代码-According to the ticker symbol is given a list of the corresponding real-time access to stock prices, according to its own analysis of the need to increase the code
- 2023-06-05 18:05:04下载
- 积分:1
-
重构改善既有代码的设计
中文pdf格式 完整版
Martin Fowler 著
侯捷 熊节 译...
重构改善既有代码的设计
中文pdf格式 完整版
Martin Fowler 著
侯捷 熊节 译 -remodeling existing code to improve the design integrity of the Chinese pdf format version of a chairman Martin Fowler Xiong MD
- 2022-04-10 19:10:23下载
- 积分:1
-
realized the arm with cf interface design. ARM7 with reading and writing to the...
实现了arm与cf接口设计。用ARM7读写CF卡文件的技术实现-realized the arm with cf interface design. ARM7 with reading and writing to the CF card technology
- 2022-09-02 03:45:02下载
- 积分:1
-
基于总线2总线
基于PCI总线的两轴运动控制卡的设计,做运动控制卡可以参考-Based on PCI Bus 2-axis motion control card design, make motion control card can refer to
- 2022-05-29 18:00:30下载
- 积分:1
-
这是一个protel 99 的傻瓜教程 做的简练 挺明白的
这是一个protel 99 的傻瓜教程 做的简练 挺明白的-This is a tutorial protel 99 fool to do the very simple to understand
- 2022-03-07 12:32:17下载
- 积分:1