文件名称:productor_consumer
介绍说明--下载内容均来自于网络,请自行研究使用
本程序综合采用V fork 、共享内存、信号量机制实现了2个生产者与2个消费者之间的进程同步。并完成了程序的准确性验证。同时,为了更加准确的测试程序的稳定性,设定了每个生产者和消费者在对缓冲区进行操作前都会等待一段随机的时间,并把缓冲区大小设置得相对较小。最后经过多次测试,程序结果均完全正确.-This procedure using a combination of V fork, shared memory, semaphores mechanism to achieve the process of two producers and two consumers synchronization. And completed to verify the accuracy of the program. Meanwhile, in order to more accurately test the stability of the program, set up in front of producers and consumers in each of the buffer operation will wait a random amount of time, and the buffer size is set to be relatively small. Finally, after several tests, the results of the program were entirely correct.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
productor_consumer
..................\consumers.c
..................\FunctionDetails.c
..................\ipc.h
..................\productors.c