首页 网络技术 网络基础     /    哲学家进餐问题C#解决程序

哲学家进餐问题C#解决程序

上传者: jiayp004 | 上传时间:2024/6/9 8:44:09 | 文件大小:37KB | 文件类型:rar
哲学家进餐问题C#解决程序
问题:哲学家就餐问题可以这样表述,假设有六位哲学家围坐在一张圆形餐桌旁,做以下两件事情之一:吃饭,或者思考。
吃东西的时候,他们就停止思考,思考的时候也停止吃东西。
餐桌中间有一大碗意大利面,每两个哲学家之间有一只筷子。
因为用一只筷子很难吃到意大利面,所以假设哲学家必须用两只筷子吃东西。
他们只能使用自己左右手边的那两只筷子。
解决方式:采用互斥量来解决该问题,每互斥量代表一只筷子。
哲学家必须等待身边两只筷子同时可以使用的时候才可以进餐,当使用一会之后,需要自动释放该互斥量(筷子),其他哲学家就可以进行抢占使用。

文件下载

资源详情

[{"title":"(24个子文件37KB)哲学家进餐问题C#解决程序","children":[{"title":"PhEating","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"PhEating.vshost.exe <span style='color:#111;'>5.50KB</span>","children":null,"spread":false},{"title":"PhEating.exe <span style='color:#111;'>24.00KB</span>","children":null,"spread":false},{"title":"PhEating.pdb <span style='color:#111;'>27.50KB</span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"PhEating.csproj <span style='color:#111;'>3.20KB</span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'>904B</span>","children":null,"spread":false},{"title":"obj","children":[{"title":"PhEating.csproj.FileListAbsolute.txt <span style='color:#111;'>1.80KB</span>","children":null,"spread":false},{"title":"WindowsApplication2.csproj.FileListAbsolute.txt <span style='color:#111;'>739B</span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"WindowsApplication2.Properties.Resources.resources <span style='color:#111;'>180B</span>","children":null,"spread":false},{"title":"PhEating.csproj.GenerateResource.Cache <span style='color:#111;'>845B</span>","children":null,"spread":false},{"title":"PhEating.MainForm.resources <span style='color:#111;'>180B</span>","children":null,"spread":false},{"title":"PhEating.exe <span style='color:#111;'>24.00KB</span>","children":null,"spread":false},{"title":"PhEating.Properties.Resources.resources <span style='color:#111;'>180B</span>","children":null,"spread":false},{"title":"WindowsApplication2.csproj.GenerateResource.Cache <span style='color:#111;'>903B</span>","children":null,"spread":false},{"title":"TempPE","children":[{"title":"Properties.Resources.Designer.cs.dll <span style='color:#111;'>4.50KB</span>","children":null,"spread":false}],"spread":false},{"title":"Refactor","children":null,"spread":false},{"title":"PhEating.pdb <span style='color:#111;'>27.50KB</span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"MainForm.Designer.cs <span style='color:#111;'>8.79KB</span>","children":null,"spread":false},{"title":"MainForm.cs <span style='color:#111;'>5.73KB</span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"Resources.resx <span style='color:#111;'>5.48KB</span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'>249B</span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'>1.17KB</span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'>1.08KB</span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'>2.77KB</span>","children":null,"spread":false}],"spread":true},{"title":"MainForm.resx <span style='color:#111;'>5.68KB</span>","children":null,"spread":false}],"spread":true},{"title":"PhEating.sln <span style='color:#111;'>913B</span>","children":null,"spread":false}],"spread":true}]

评论信息

  • _maybewecan:
    可以的,界面简洁点也方便自己修改2332018-01-20
  • 印月无痕:
    不错,界面不好看不要紧,要的是内容,能展示多线程预防死锁的问题2015-07-28
  • leaf_8:
    还不错,我就是按照这个思维做的我们的课程设计,结果通过了2015-06-05
  • codeleor:
    可以,就是图形界面不怎么美观2014-12-03
  • hui42411:
    界面上没有动态显示,没有人物图像2014-05-19

免责申明

【好快吧下载】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【好快吧下载】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【好快吧下载】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,8686821#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明