登录
首页 » Java » philosopher(1.6)

philosopher(1.6)

于 2008-05-20 发布 文件大小:6KB
0 139
下载积分: 1 下载次数: 34

代码说明:

  哲学家进餐问题——Java语言实现 哲学家进餐问题是一个多线程运用的经典例子,涉及到线程同步/互斥,临界区访问问题以及一个避免死锁的解决方法。 有五个哲学家绕着圆桌坐,每个哲学家面前有一盘面,两人之间有一支筷子,这样每个哲学家左右各有一支筷子。 哲学家有2个状态,思考或者拿起筷子吃饭。如果哲学家拿到一只筷子,不能吃饭,直到拿到2只才能吃饭,并且一次只能拿起身边的一支筷子。一旦拿起便不会放下筷子直到把饭吃完,此时才把这双筷子放回原处。 如果,很不幸地,每个哲学家拿起他或她左边的筷子,那么就没有人可以吃到饭了。这就会造成死锁了。。这是需要坚决杜绝的,正如操作系统的死锁问题。()

文件列表:

philosopher
...........\.classpath
...........\.project
...........\DiningPhils.class
...........\DiningPhils.java
...........\Philosopher.class

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

发表评论


0 个回复

  • 12过滤器
    说明:  jsP过滤器模型,十分适合新手学习,建议下载,内容详细(JsP filter model, very suitable for beginners to learn, it is recommended to download, detailed content)
    2020-06-24 08:00:02下载
    积分:1
  • my-spring-boot-master
    springboot mybatis开发基本类生成项目代码(Springboot mybatis develops basic classes to generate project code)
    2020-06-25 19:20:01下载
    积分:1
  • 抽奖
    说明:  使用eclipseIDE和JAVA语言编写抽奖GUI应用程序,简洁美观易懂。(Using eclipse IDE and Java language to write the lottery GUI application program, which is simple, beautiful and easy to understand.)
    2020-04-02 23:44:27下载
    积分:1
  • Point102
    用c++求折线的长度,程序可以改变输入点的个数,包含所有的代码.(C++ line with the length requirements, the program can change the number of input points, including all of the code.)
    2016-02-29 01:26:10下载
    积分:1
  • spring-boot-with-activiti-master
    spring boot 工作流,采用spring boot的结构框架实现工作流的机制(Spring boot workflow, using spring boot structure framework to implement workflow mechanism)
    2020-06-24 17:00:02下载
    积分:1
  • Chapter09
    Heaps & Priority Queues Implementations and Apps.
    2015-04-13 02:21:36下载
    积分:1
  • JCalender-1.3.2
    说明:  adding a java calendar for your project, good luck
    2019-01-05 16:13:44下载
    积分:1
  • GB28181-2011T
    GB28181-2011T 安全防范视频监控联网系统信息传输、交换、控制技术要求(GB SAFE VIDEO)
    2013-08-24 13:34:24下载
    积分:1
  • javaforpattern
    提供在java中实用正则表达式的一系列例子(Provides java regular expression in a series of practical examples)
    2010-05-07 14:39:45下载
    积分:1
  • shuapiao
    本免费刷票软件界面优美,功能强大,速度快,适用于各种网站的投票评选活动。声明:本软件是免费刷票工具,只供大家研究测试的免费投票作弊器,请勿滥用,否则后果自负。
    2009-12-21 19:32:49下载
    积分:1
  • 696518资源总数
  • 104802会员总数
  • 34今日下载