文件名称:unix_c_Thread
- 所属分类:
- Internet/网络编程
- 资源属性:
- [Text]
- 上传时间:
- 2014-01-13
- 文件大小:
- 3kb
- 下载次数:
- 0次
- 提 供 者:
- 李**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
UNIC-C 线程同步问题。
五个哲学家围坐在一张圆桌周围,每个哲学家面前都有一盘
通心粉。由于通心粉很滑,所以需要两把叉子才能夹住。相
邻两个盘子之间放有一把叉子。哲学家的生活中有两种交替
活动时段:即吃饭和思考。当一个哲学家觉得饿了时,他就
试图分两次去取其左边和右边的叉子,每次拿一把,但不分
次序。如果成功地得到了两把叉子,就开始吃饭,吃完后放
下叉子继续思考。-UNIC-C thread synchronization problems. Five philosophers sitting around a round table in front of each philosopher has a plate of pasta. As the pasta is very slippery, so you need two forks to grip. Placed a fork between two adjacent plates. Philosopher' s life there are two alternating active periods: that eating and thinking. When a philosopher feel hungry when he tried twice to whichever left and right fork, each take one, but regardless of the order. If you successfully got two forks, they begin to eat, fork down after eating continue thinking.
五个哲学家围坐在一张圆桌周围,每个哲学家面前都有一盘
通心粉。由于通心粉很滑,所以需要两把叉子才能夹住。相
邻两个盘子之间放有一把叉子。哲学家的生活中有两种交替
活动时段:即吃饭和思考。当一个哲学家觉得饿了时,他就
试图分两次去取其左边和右边的叉子,每次拿一把,但不分
次序。如果成功地得到了两把叉子,就开始吃饭,吃完后放
下叉子继续思考。-UNIC-C thread synchronization problems. Five philosophers sitting around a round table in front of each philosopher has a plate of pasta. As the pasta is very slippery, so you need two forks to grip. Placed a fork between two adjacent plates. Philosopher' s life there are two alternating active periods: that eating and thinking. When a philosopher feel hungry when he tried twice to whichever left and right fork, each take one, but regardless of the order. If you successfully got two forks, they begin to eat, fork down after eating continue thinking.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
unix_c_10.txt