文件名称:PV
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.86mb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
用多线程实现“生产者-消费者问题”本作业要求设计并实现一个进程,该进程拥有一个生产者线程和一个消费者线程,它们使用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
Debug/example.exe
Debug/example.exe.embed.manifest
Debug/example.exe.embed.manifest.res
Debug/example.exe.intermediate.manifest
Debug/example.ilk
Debug/example.pdb
Debug/mt.dep
Debug/pv.obj
Debug/vc90.idb
Debug/vc90.pdb
Debug
example.sln
example.vcproj
example.vcproj.LENOVO.lenovo.user
pv.cpp
Debug/BuildLog.htm
Debug/example.exe
Debug/example.exe.embed.manifest
Debug/example.exe.embed.manifest.res
Debug/example.exe.intermediate.manifest
Debug/example.ilk
Debug/example.pdb
Debug/mt.dep
Debug/pv.obj
Debug/vc90.idb
Debug/vc90.pdb
Debug
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.