登录
首页 » Java » philosopher(1.6)

philosopher(1.6)

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

代码说明:

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

文件列表:

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

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

发表评论

0 个回复

  • Text
    使用java编写的文件读取显示的软件,代码风格简洁便于读取,使用了java图形进行编写。可以用来功能拓展的二次开发,也可以用来入门学习java的图形化开发。(Prepared using the java file to read the display of the software, the code concise style is easy to read, the use of the java graphics to write. The two development can be used to extend functions, can also be used to the development of graphical java entry learning.)
    2014-01-18 20:52:05下载
    积分:1
  • java_Factory
    java 设计模式 实例 Factory(java Design pattern Factory)
    2015-10-30 22:22:57下载
    积分:1
  • PictureCombine
    基于JAVA开发平台的数字拼图游戏,其实现较为简单,刚学完JAVA,为初作!(JAVA development platform based on the number of jigsaw puzzle, and its relatively simple to achieve, after just learning JAVA, for the early!)
    2009-04-11 12:41:49下载
    积分:1
  • SSM+Maven整合
    说明:  ssm+maven整合实例,这是一个简单的实例,可以发布对于ssm框架与maven工具使用。(Example of SSM + Maven integration. This is a simple example that can be published for use with SSM frameworks and maven tools.)
    2020-06-21 06:40:02下载
    积分:1
  • hades-0.97-doc
    说明:  Hades (HAmburg DEsign System) is a pure-Java framework for interactive simulation, especially for digital system simulation. It includes a graphical schematics editor, several simulation engines, and a library of simulation models.
    2019-01-07 14:52:08下载
    积分:1
  • SecurityPolicyTests
    This is a series of unit tests for backup/restore of the SecurityPolicy class.
    2014-02-18 14:55:04下载
    积分:1
  • 失物招领_SWING
    说明:  使用Java Swing 实现的失物招领功能,包括丢失者登记于招领这登记,管理员认领等功能,mysql数据库(The lost and found function implemented by Java swing includes the function of registering the lost in the lost, the function of administrator claiming, MySQL database, etc)
    2020-04-04 21:20:25下载
    积分:1
  • mouse
    编写应用程序,当鼠标进入窗口时,用一个文本框给出鼠标进入或离开的信息,当鼠标左键按下拖拽时,文本框给出鼠标所在点的坐标(Written application, when the mouse enters the window, a text box with the mouse enters or leaves given the information, press the left mouse button when dragging, the text box where the point given the coordinates of the mouse)
    2011-11-20 14:11:39下载
    积分:1
  • WEB_Chat_Room
    java常连接通信,java基于web聊天系统(java often connected communication)
    2014-02-26 16:27:56下载
    积分:1
  • java图书管理系统毕业设计(源代码 论文)
    说明:  java图书管理系统毕业设计(源代码 论文)(Java Library Management System Graduation Project (Source code thesis))
    2020-11-09 15:39:47下载
    积分:1
  • 696516资源总数
  • 106562会员总数
  • 4今日下载