Description: 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.
To Search:
File list (Check if you may need any files):
productor_consumer
..................\consumers.c
..................\FunctionDetails.c
..................\ipc.h
..................\productors.c