文件名称:ReaderAndWriter
- 所属分类:
- Linux/Unix编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- 翔*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
Linux下读者写者问题, 1)写-写互斥:不能有两个写者同时进行写操作; 2)读-写互斥:不能同时有一个线程在读,而另一个线程在写; 3)读-读允许:可以有一个或多个读者在读; 4)读者优先的附加限制:如果读者申请进行读操作时已有另一个读者正在进行读操作,则该读者可直接开始读操作; 5)写者优先的附加限制:如果一个读者申请进行读操作时已有另一个写者在等待访问共享资源,则该读者必须等到没有写者处于等待状态后才能开始读操作。-Under Linux readers to write, 1) write- write mutually exclusive: You can not have two writers write 2) read- write mutually exclusive: You can not have a thread while another thread writing ) Reading- Reading allowed: you can have one or more readers 4) priority readers additional restrictions: If you apply for a read operation has been another reader being read, the readers may read 5) write priority additional restrictions: If a reader application for the read operation has another write access to shared resources in the waiting, the reader must wait until not write in the wait state to read.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ReaderAndWriter.cpp