-
哲学家进餐问题是荷兰学者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
-
DSP2812
dsp2812-c语言高手,通过这本书对你dsp有一定帮助-dsp2812-c language experts, through this book you have some help dsp
- 2023-04-14 23:10:03下载
- 积分:1
-
Windows Media Format 11 SDK帮助文档,用于流媒体开发
Windows Media Format 11 SDK帮助文档,用于流媒体开发-err
- 2022-08-20 04:40:12下载
- 积分:1
-
清华大学数学建模讲义,对于喜欢数学的人非常有用。利用数学模型解决实际问题。
清华大学数学建模讲义,对于喜欢数学的人非常有用。利用数学模型解决实际问题。-Tsinghua University, mathematical modeling notes, for those who like mathematics very useful. The use of mathematical models to solve practical problems.
- 2022-07-25 04:57:34下载
- 积分:1
-
AVerMedia EZCapture Software Development Kit (DLL Version)
We give one VC+...
AVerMedia EZCapture Software Development Kit (DLL Version)
We give one VC++ sample code to show how to use our SDK tool.
This sample code contains code for Win2000 and Win98.
Notice 1:
After you compile our sample code,you need to place our SDK
DLL (AVerAPI.DLL) in your current directory or in Windows or
Windows System directory, so as to make our sample EXE run.
Notice 2:
AVerAPI.h is AVerAPI.dll s Header File,AVerAPI.lib is
AVerAPI.dll s Win32 Static Library-AVerMedia EZCapture Software Development Kit (DLL Version)
We give one VC++ sample code to show how to use our SDK tool.
This sample code contains code for Win2000 and Win98.
Notice 1:
After you compile our sample code,you need to place our SDK
DLL (AVerAPI.DLL) in your current directory or in Windows or
Windows System directory, so as to make our sample EXE run.
Notice 2:
AVerAPI.h is AVerAPI.dll s Header File,AVerAPI.lib is
AV
- 2022-04-09 22:25:58下载
- 积分:1
-
一本介绍LINUX操作系统的驱动程序的书籍,希望对大家有帮助
一本介绍LINUX操作系统的驱动程序的书籍,希望对大家有帮助-a Linux operating system on the driver"s books, we hope to help
- 2022-03-04 16:59:50下载
- 积分:1
-
实用小程序,自动计算LED编码,相当实用。
实用小程序,自动计算LED编码,相当实用。-Practical small procedures, automatic calculation of LED codes, very practical.
- 2023-06-21 02:00:03下载
- 积分:1
-
自动取款机(ATM)
标题:自动取款机(ATM) 说明:这说明了ATM的功能.. 这是一个计算机化的ATM软件,接受credi卡的详细信息,FRM的用户和处理事务。管理员可以查看报告.. 等每月每周的错误报告。 从Planet-Source-Code.com...此文件来家里数百万行源代码 您可以查看评论验证码/和或表决时:http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=57576&lngWId=1 笔者也保留了一定的版权这段代码...请通过审查所有版权条件在上面的URL观察他们的要求和法律。
- 2022-08-02 16:01:53下载
- 积分:1
-
本文专门讲解编写成功网络应用程序时所需的基本知识和A P I调用。...
本文专门讲解编写成功网络应用程序时所需的基本知识和A P I调用。-The preparation of this article devoted to the success of network applications required for the basic knowledge and API calls.
- 2023-09-05 18:55:03下载
- 积分:1
-
在线考试系统
还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者还不错适合初学者 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2022-08-11 06:37:35下载
- 积分:1