登录
首页 » Java » philosopher(1.6)

philosopher(1.6)

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

代码说明:

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

文件列表:

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

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

发表评论

0 个回复

  • InfoManage
    采用的Java Web设计,开发平台Java和软件架构C/S 就是简单的MVC设计模式+Jsp+Servlet,使用软件Myeclipse + Tomcat + Mysql + Java 由于花费一天时间写Html和代码实现,就没怎么太高要求,能用下就可以了希望可以通过, 就没实现导入的功能,其余功能完全(Using Java Web design, development platforms Java and software architecture C/S is a simple MVC design pattern+Jsp+Servlet, using software Myeclipse+ Tomcat+ Mysql+ Java Html due to spend a day and write code, there is no how high requirements, can hope you can use the following can be, there is no import function to achieve the remaining fully functional)
    2013-11-22 19:59:40下载
    积分:1
  • jishiben
    实现一个简单的计算器的功能只要配好JDK,就可以使用供初学者学习学习(calculator )
    2010-12-29 10:40:34下载
    积分:1
  • photochange
    实现图片轮换的控件,支持flash图片轮换(Controls to achieve image rotation, support flash image rotation)
    2011-05-10 12:22:04下载
    积分:1
  • En_Decoder
    java自带类3des加解密 java自带类3des加解密 java自带类3des加解密(java class comes 3des encryption 3des decryption java java class comes with its own class 3des encryption and decryption)
    2013-08-27 15:11:13下载
    积分:1
  • Utile
    根据值来取ID,或者根据ID来取值,便于两者之间的转换(Exchange from ID and values, we can tanslate between ID and values easily. )
    2005-07-12 15:19:32下载
    积分:1
  • JSPtushu
    说明:  代码中的数据库不用任何设置,因为本程序为了能好移植到其它的计算机数据库的链接都是动态进 行的。通过本程序你可以了解一些界面设计的技巧以及如何进行数据库路径的动态设置与链接(Code without any settings in the database, because the process can be better to migrate to other dynamic computer database links are carried out. Through this program you can learn some skills in interface design and how to dynamically set the database path and link)
    2010-04-02 13:42:05下载
    积分:1
  • flash4
    有四套录音的demo,都实现了录音功能,播放录音的功能,还是很不错的(There are four sets of recording demo, realize the recording function, play the recording function, or very good)
    2014-01-18 15:22:51下载
    积分:1
  • hello-world-portlet
    liferay portlet 实例,可以直接部署(liferay portlet instance, can be directly deployed)
    2013-08-03 12:57:10下载
    积分:1
  • java如何操作Excel文件
    说明:  java操作Excel的一些方法,其中有具体的例子(the methed of java'option for Excel)
    2017-10-15 00:47:55下载
    积分:1
  • 进销存管理系统 JSP
    进销存管理系统,JSP+sqlserver2000,数据库自己执行以下查询语句,直接插入就可以了,其他没什么问题。(Purchase, Sales and Inventory Management System, JSP+ sqlserver2000, following its own database query, can be directly inserted into the other no problem.)
    2009-04-20 10:29:01下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载