登录
首页 » Java » philosopher(1.6)

philosopher(1.6)

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

代码说明:

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

文件列表:

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

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

发表评论

0 个回复

  • NomalClassTest
    一些基本的枚举的用法例子介绍,程序都可以运行的,开发的工具是eclipse(Usage examples to introduce some basic enumeration, the program can be run, the development of tools is the eclipse )
    2015-05-08 11:07:08下载
    积分:1
  • Desktop
    基于web的java开发设计,作业管理系统。源码加文档,功能齐全。(Java-based web development and design, and job management system. Source plus documents, fully functional.)
    2015-04-02 16:55:18下载
    积分:1
  • 605464
    Custom interceptors 自定义拦截器,很好,值的学习(Custom interceptors custom interceptor, good, value learning)
    2018-09-15 19:54:51下载
    积分:1
  • Java-generates
    java生成的一一维码图片,该程序可以在eclipse直接运行(Java generated one one dimensional picture code, the program can be run in eclipse directly)
    2013-10-09 11:57:47下载
    积分:1
  • Oreilly.Java.RMI
    Oreilly.Java.RMI,Oreilly丛书中对于RMI的一本书(Oreilly.Java.RMI, Oreilly Books for a book RMI)
    2008-01-02 19:14:25下载
    积分:1
  • SharpNeatV2
    java file for tsp problem solution and neural network sample mode .diffrent techniques in neural network
    2010-10-07 12:57:31下载
    积分:1
  • ContentEncodingList
    ContentEncodingList extends SIPHeaderList.
    2014-01-08 10:56:38下载
    积分:1
  • admin-templates
    这是网站后台管理模板,是非常实用的,它可以帮助你完成网站后台的实现(This is the Site Admin templates are very useful, it can help you to complete the implementation of site background)
    2011-06-19 12:39:02下载
    积分:1
  • acr3r3r3r3
    关于java的一些课后作业的相关解释 对于初学者还是有一定程度的帮助 希望大家呢能祈祷帮助(java on the after-school operations related explanation for beginners or to a certain extent, hopefully with the help of Andrew can prayer help?)
    2007-04-23 12:02:13下载
    积分:1
  • attachments
    chat window. by the help of this s/w u can do chatting from ur friends via lan after some modification.
    2009-11-27 23:22:57下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载