PV
pv 

所属分类:进程与线程
开发工具:Visual C++
文件大小:1908KB
下载次数:14
上传日期:2011-01-11 12:59:15
上 传 者不锈钢锅碗瓢盆
说明:  用多线程实现“生产者-消费者问题”本作业要求设计并实现一个进程,该进程拥有一个生产者线程和一个消费者线程,它们使用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 )

文件列表:
example.ncb (8514560, 2010-12-23)
example.sln (879, 2010-12-23)
example.vcproj (3937, 2010-12-23)
example.vcproj.LENOVO.lenovo.user (1409, 2010-12-23)
pv.cpp (3906, 2010-12-23)
Debug\BuildLog.htm (9992, 2010-12-23)
Debug\example.exe (43008, 2010-12-23)
Debug\example.exe.embed.manifest (663, 2010-12-23)
Debug\example.exe.embed.manifest.res (728, 2010-12-23)
Debug\example.exe.intermediate.manifest (621, 2010-12-23)
Debug\example.ilk (399160, 2010-12-23)
Debug\example.pdb (642048, 2010-12-23)
Debug\mt.dep (67, 2010-12-23)
Debug\pv.obj (65149, 2010-12-23)
Debug\vc90.idb (445440, 2010-12-23)
Debug\vc90.pdb (249856, 2010-12-23)
Debug (0, 2010-12-23)

近期下载者

相关文件


收藏者