文件名称:Access
介绍说明--下载内容均来自于网络,请自行研究使用
在Windows2000环境下,创建一个控制台进程,此进程包含n个线程。用这n个线程来表示n个读者或写者。每个线程按相应测试数据文件(后面介绍)的要求进行读写操作。用信号量机制分别实现读者优先和写者优先问题。
读者-写者问题的读写操作限制(包括读者优先和写者优先)
1) 写-写互斥:不能有两个写者同时进行写操作
2) 读-写互斥:不能同时有一个线程在读,而另一个线程在写。
3) 读-读允许:可以有一个或多个读者在读。
-In Windows2000 environment, create a console process, this process contains n threads. Using this n that n threads to a reader or writer. Each thread in accordance with the corresponding test data files (described later) to read and write operation requirements. Semaphore mechanism with the respective priorities and the achievement of the readers who write priority issue. Readers- to write the issue of restrictions on the read and write operations (including readers and write priority priority) 1) to write- write mutex: You can not write those two write operations at the same time 2) read- write mutex: not at the same time there is a line way in the reading and writing another thread. 3) Reading- Reading allowed: You can have one or more readers to read.
读者-写者问题的读写操作限制(包括读者优先和写者优先)
1) 写-写互斥:不能有两个写者同时进行写操作
2) 读-写互斥:不能同时有一个线程在读,而另一个线程在写。
3) 读-读允许:可以有一个或多个读者在读。
-In Windows2000 environment, create a console process, this process contains n threads. Using this n that n threads to a reader or writer. Each thread in accordance with the corresponding test data files (described later) to read and write operation requirements. Semaphore mechanism with the respective priorities and the achievement of the readers who write priority issue. Readers- to write the issue of restrictions on the read and write operations (including readers and write priority priority) 1) to write- write mutex: You can not write those two write operations at the same time 2) read- write mutex: not at the same time there is a line way in the reading and writing another thread. 3) Reading- Reading allowed: You can have one or more readers to read.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
reader and writer.doc
Reader-Write.cpp
Reader-Write.cpp