登录
首页 » Java » philosopher(1.6)

philosopher(1.6)

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

代码说明:

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

文件列表:

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

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

发表评论

0 个回复

  • java
    设计一个成绩录入程序,通过键盘录入examId(考号,要求全部是数字符号)、name(姓名,要求全部是字母符号)和score(成绩,要求介于0~800)。当输入数据的类型、输入数据的范围出现错误时,使用Java语言定义的异常类和自定义异常类进行处理。(Entry procedures for the design of a performance by keyboard entry examId (candidate number, the number of requests are all symbols), name (name, requirement for a letter symbols) and score (results, request the range of 0 ~ 800). When the type of input data, the scope of input data errors, use the Java language as defined custom exception classes and exception classes for processing.)
    2009-06-08 23:25:21下载
    积分:1
  • JapaneseVowels
    说明:  数据挖掘的应用,对数据集建立决策树,然后利用测试集中的数据判断测试。并给出最终的决策判断的正确率。(The application of data mining, decision tree on the data set, and then use the test to determine the test data set. The final decision making given the correct rate.)
    2011-04-11 21:55:07下载
    积分:1
  • MyEclipse8-Spket
    MyEclipse8以上安装Spket插件[破解版](MyEclipse8 installation above Spket plug [cracked version])
    2013-09-12 12:59:29下载
    积分:1
  • Coursedesign
    源代码转换的一个小小的实现,写得比较一般,但是功能齐全(Source code into a small implementation written in general, but fully functional)
    2012-12-18 20:28:11下载
    积分:1
  • zhbj
    智慧城市android版本源码共享,可试用修改(Smart City Source Sharing)
    2019-03-05 22:24:22下载
    积分:1
  • chatSystem
    通过用JAVA语言编程出可以窗口聊天的程序,跟QQ聊天窗口差不多。(By using the JAVA programming language that can chat program window, with the QQ chat window almost.)
    2014-04-29 15:48:55下载
    积分:1
  • Java_String.format
    Java中String.format的用法(String.format usage in Java)
    2013-11-21 11:27:25下载
    积分:1
  • Exercise4
    ssd8Exercise4上机作业,代码高效正确,可运行且有说明文档。(ssd8Exercise4 machine operation, efficient code correctly, you can run and there is documentation.)
    2013-09-24 20:35:51下载
    积分:1
  • CellSpanTest
    setup to exercise tables in which cells use spanning.
    2013-12-02 15:39:46下载
    积分:1
  • day01
    java教学实例1,适合新手学习使用的简单范例(java example 1)
    2016-04-22 17:39:26下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载