文件名称:read-write
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:3.96kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
实验程序模拟多个生产/消费者在有界缓冲上正确的操作。它利用N个字节的共享内存作为有界循环缓冲区,利用写一字符模拟放一个产品,利用读一字符模拟消费一个产品。当缓冲区空时消费者应阻塞睡眠,而当缓冲区满时生产者应当阻塞睡眠。一旦缓冲区中有空单元,生产者进程就向空单元中入写字符,
并报告写的内容和位置。一旦缓冲区中有未读过的字符,消费者进程就从该单元中
读出字符,并报告读取位置。生产者不能向同一单元中连续写两次以上相同的字
符,消费者也不能从同一单元中连续读两次以上相同的字符。
-character simulation consumption of a product. When the buffer when consumers should sleep, but when the buffer obstruction when producers shall sleep with obstruction. Once free buffer unit, the producers to empty units in the process of the writing characters,
And the report written content and position. Once the buffer have not read characters, consumers from this unit in the process
Read characters, and report to read. Producers cannot write to the same unit for more than two identical words
Operator, consumer also cannot read from the same unit in successive two above the same character.
并报告写的内容和位置。一旦缓冲区中有未读过的字符,消费者进程就从该单元中
读出字符,并报告读取位置。生产者不能向同一单元中连续写两次以上相同的字
符,消费者也不能从同一单元中连续读两次以上相同的字符。
-character simulation consumption of a product. When the buffer when consumers should sleep, but when the buffer obstruction when producers shall sleep with obstruction. Once free buffer unit, the producers to empty units in the process of the writing characters,
And the report written content and position. Once the buffer have not read characters, consumers from this unit in the process
Read characters, and report to read. Producers cannot write to the same unit for more than two identical words
Operator, consumer also cannot read from the same unit in successive two above the same character.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.