登录
首页 » 软件系统 » 哲学家进餐问题是荷兰学者Dijkstra 提出的经典问题之一,它是一个信号量机制问题的应用,在操作系统文化史上具有非常重要的地位。对该问题的剖析有助于学生深刻地...

哲学家进餐问题是荷兰学者Dijkstra 提出的经典问题之一,它是一个信号量机制问题的应用,在操作系统文化史上具有非常重要的地位。对该问题的剖析有助于学生深刻地...

于 2022-03-25 发布 文件大小:82.91 kB
0 193
下载积分: 2 下载次数: 1

代码说明:

哲学家进餐问题是荷兰学者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 wi

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 有关字节对齐的一些参考,主要介绍结构体成员变量的对齐问题...
    有关字节对齐的一些参考,主要介绍结构体成员变量的对齐问题-Byte-aligned some of the relevant reference, mainly introduce the members of the structure alignment problem variables
    2022-03-19 08:33:46下载
    积分:1
  • Video player, you can achieve the open, play, pause, stop and other functions
    视频播放器,可以实现打开,播放,暂停,停止等功能-Video player, you can achieve the open, play, pause, stop and other functions
    2022-02-05 15:08:59下载
    积分:1
  • Windows Media Format 11 SDK帮助文档,用于流媒体开发
    Windows Media Format 11 SDK帮助文档,用于流媒体开发-err
    2022-08-20 04:40:12下载
    积分:1
  • 经过几个月的设计和开发,计算机图书馆管理基本开发完毕。其功能基本符合需求,能够完成书籍录入,借阅,查询、计、用户管理。并提供部分维护功能,使管理员能够...
    经过几个月的设计和开发,计算机图书馆管理系统基本开发完毕。其功能基本符合需求,能够完成书籍录入,借阅,查询、统计、用户管理。并提供部分系统维护功能,使管理员能够方便进行数据添加和修改、数据删除等功能。 但是由于毕业设计时间较短,所以该系统还有许多不尽如人意的地方,比如联机文档比较少,用户界面不够美观,出错处理不够等多方面问题。这些都有待进一步改善。 几个月的毕业设计,使我提高了实际操作能力,从以前的理论上升到实践,从感性认识上升到理性认识,真正做到学有所用,懂得先要发现问题,分析问题,解决问题,虽然在设计过程中我也遇到一些困难,但在老师的帮助和自己的努力下,我都认真克服了,但由于时间紧触,我并不能做到尽善尽美,应该说这是一大遗憾吧,我相信这对以后会有别开生会的体验。-After several months of design and development, computer library management system completed the basic development. Its functions in line with the demand for entry to complete the book, borrow, query, statistics, user management. And to provide some system maintenance functions, allowing administrators to easily add and modify data, delete data and other functions. However, due to a shorter design time graduation, so the system is not satisfactory there are still many places, such as less-line documentation, user interface s aesthetic limitations, mistakes, etc. to deal with the issue of not enough. These are to be further improved. Months of gradua
    2022-06-03 01:41:31下载
    积分:1
  • 自组织分层路由
    Self Organizing Hierarchical Routing
    2022-10-23 17:55:03下载
    积分:1
  • HDL硬描述语言编写的MCS51微控制器IP核,在…
    用HDL硬件描述语言写成的MCS51系列单片机IP核,其中包括4位的MCU,内容系4篇硕士论文,其中两个需要用CAJ阅读器打开 -HDL Hardware Description Language with written MCS51 Microcontroller IP core, including 4-bit MCU, the contents of a master" s thesis, Department 4, two of which need to open the CAJ Viewer
    2022-06-26 13:00:34下载
    积分:1
  • 文曲星编程工具,能更好地升级你的文曲星 欢迎下载
    文曲星编程工具,能更好地升级你的文曲星 欢迎下载-Portable programming tools, better able to upgrade your rings welcome to download
    2022-01-25 17:39:24下载
    积分:1
  • I DOS alliance in China to see a lot of the forum users of the DOS system is not...
    本人在中国DOS联盟的论坛里看到好多网友对DOS系统不太熟悉,又一时找不到很好的学习材料,我很早学习电脑时在洪恩乐园里看到关于DOS的教材,觉得很不错的,现将其整理为CHM格式,供各位网友下载学习。-I DOS alliance in China to see a lot of the forum users of the DOS system is not too familiar with not very good at learning materials, I am learning the computer early in the Human theme park to see the materials on the DOS, I think I really good, now its finishing to CHM format for your users to download the study.
    2022-06-20 06:49:47下载
    积分:1
  • linux内核编程 linux内核编程
    linux内核编程 linux内核编程-linux kernel programming linux kernel programming
    2023-04-30 05:40:03下载
    积分:1
  • 可以很快完成 一个应用小,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,自己看看吧!...
    可以很快完成 一个应用小软,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,自己看看吧!-be completed very soon a small application of soft ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, see for yourself!
    2022-03-06 02:44:51下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载