Producer - Consumer Application Instructions Authors: Chantal Murdock; James Lopez
The producer–consumer problem (also known as the bounded-buffer problem). A classic example of a multi-process synchronization problem. This application aims to solve this using Win32 API.
Option 1:
-
In order to run this program please click the "bin" folder, then the "debug" folder.
-
In the debug folder should be the application with the file extension .exe for executable. Please click this in order to run the program.
-
Upon exit, there will be a file generated from running the program named "producer_consumer.txt ". This will be located in the main subdirectory "PRODUCER_CONSUMER".
Option 2:
-
In order to run this program please click the .cbp extension (Codeblocks Project).
-
Codeblocks should appear, with the Producer - Consumer Project open. Click the "build and run icon" - a green play button with a gear in order to compile and run the application.
-
Upon exit, there will be a file generated from running the program named "producer_consumer.txt ". This will be located in the main subdirectory "PRODUCER_CONSUMER".
The sleep time is inputted through a random number generator. The different sleep times are then inputted into a loop, to test the different cases of Producers and Consumers via sleep time.