文件名称:smoker
- 所属分类:
- 操作系统开发
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2015-05-07
- 文件大小:
- 7kb
- 下载次数:
- 0次
- 提 供 者:
- Zichen*******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
抽烟者问题。假设一个系统中有三个抽烟者进程,每个抽烟者不断地卷烟并抽 烟。抽烟者卷起并抽掉一颗烟需要有三种材料:烟草、纸和胶水。一个抽烟者有烟 草,一个有纸,另一个有胶水。系统中还有两个供应者进程,它们无限地供应所有 三种材料,但每次仅轮流提供三种材料中的两种。得到缺失的两种材料的抽烟者在 卷起并抽掉一颗烟后会发信号通知供应者,让它继续提供另外的两种材料。这一过 程重复进行。 -Smoker problem. Suppose a system has three smoker processes, each smoker and continue to smoke cigarettes. Smoker smoke rolled up and deprived of a need to have three materials: tobacco, paper and glue. A tobacco smoker, a paper, glue another. There are two systems provider processes that unlimited supply of all three materials, but each time only two of the three in turn provided material. Get the missing two materials in roll and deprived smokers smoke after a notice will be sent a signal provider, it continues to provide an additional two materials. This process is repeated.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
201300130138 张子诚 实验四
..........................\ipc.c
..........................\ipc.h
..........................\smoker1.c
..........................\smoker2.c
..........................\smoker3.c
..........................\supply.c