登录
首页 » Java » philosopher(1.6)

philosopher(1.6)

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

代码说明:

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

文件列表:

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

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

发表评论

0 个回复

  • LogWriter
    A wrapper around log4j that is used for logging debug and errors.
    2013-11-04 10:19:44下载
    积分:1
  • HealthyLifestyle
    program source code for a lifestyle program
    2019-03-17 18:33:32下载
    积分:1
  • INote
    模仿小米做的便签,功能齐全,有桌面小组件(Imitation millet do notes, fully functional, there is a desktop widget)
    2013-11-28 17:23:59下载
    积分:1
  • DatabaseOperater
    数据库连接及简单操作(database)
    2018-10-14 15:27:15下载
    积分:1
  • textsplittextnomodificationallowederrEE
    Create an ent3 reference and execute the "splitText(offset)" method.
    2013-10-30 21:53:50下载
    积分:1
  • ADBServerNeedRestartException
    Convert integer format IP into xxx.xxx.xxx.xxx format for Andriod.
    2013-10-06 00:42:43下载
    积分:1
  • ssm mysql实现的Java web酒店管理项目(源码+数据库+文档+视频)
    【实例简介】新手练习项目,很适合练习
    2021-10-03 00:31:34下载
    积分:1
  • itmuch-spring-cloud-study-master
    说明:  操作简单的Mongodb网页web管理工具,基于Spring Boot2.0支持mongodb集群(Simple operation of mongodb web management tools, based on spring boot2.0 support mongodb cluster)
    2021-04-05 22:54:33下载
    积分:1
  • iQQ_beta1.02
    仿QQ 在linux下的源码,你懂的。。。。。。。
    2013-03-15 09:41:21下载
    积分:1
  • calculator
    java实用小计算器,模仿windows自带的计算器,功能全面(Java practical calculator, imitate small Windows calculator attached, comprehensive functions)
    2010-05-06 18:52:30下载
    积分:1
  • 696516资源总数
  • 106409会员总数
  • 8今日下载