文件名称:PV
- 所属分类:
- 进程与线程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.86mb
- 下载次数:
- 0次
- 提 供 者:
- pan****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
用多线程实现“生产者-消费者问题”本作业要求设计并实现一个进程,该进程拥有一个生产者线程和一个消费者线程,它们使用N个不同的缓冲区(N为一个自定义的确定的数值,例如N=32)。你需要使用如下信号量:一个互斥信号量,用以阻止生产者线程和消费者线程同时操作缓冲区列表;一个信号量,当生产者线程生产出一个物品时可以用它向消费者线程发出信号;一个信号量,消费者线程释放出一个空缓冲区时可以用它向生产者线程发出信号;
-Achieved with multi-threaded " producer- consumer problems" of the operational requirements of the design and implementation of a process that has a producer thread and a consumer thread, which use different buffer N (N is a custom to determine values, for example, N = 32). The amount you need to use the following signals: a mutex to prevent the producer and consumer threads simultaneously thread the buffer list a signal to the amount produced when the producer thread can use an item when sent to the consumer thread signal a semaphore, the consumer thread to release an empty buffer when the producer thread can use it to send a signal
-Achieved with multi-threaded " producer- consumer problems" of the operational requirements of the design and implementation of a process that has a producer thread and a consumer thread, which use different buffer N (N is a custom to determine values, for example, N = 32). The amount you need to use the following signals: a mutex to prevent the producer and consumer threads simultaneously thread the buffer list a signal to the amount produced when the producer thread can use an item when sent to the consumer thread signal a semaphore, the consumer thread to release an empty buffer when the producer thread can use it to send a signal
相关搜索: PV
(系统自动生成,下载前可以参看下载内容)
下载文件列表
example.ncb
example.sln
example.vcproj
example.vcproj.LENOVO.lenovo.user
pv.cpp
Debug\BuildLog.htm
.....\example.exe
.....\example.exe.embed.manifest
.....\example.exe.embed.manifest.res
.....\example.exe.intermediate.manifest
.....\example.ilk
.....\example.pdb
.....\mt.dep
.....\pv.obj
.....\vc90.idb
.....\vc90.pdb
Debug
example.sln
example.vcproj
example.vcproj.LENOVO.lenovo.user
pv.cpp
Debug\BuildLog.htm
.....\example.exe
.....\example.exe.embed.manifest
.....\example.exe.embed.manifest.res
.....\example.exe.intermediate.manifest
.....\example.ilk
.....\example.pdb
.....\mt.dep
.....\pv.obj
.....\vc90.idb
.....\vc90.pdb
Debug