Producer Consumer Program
Producer Consumer Program@Oregonstate
A producer thread places jobs in a bounded-buffer, and these jobs are retrieved by a consumer thread.
- When initially started up, the program creates a producer thread object and a consumer thread object. The threads then can be started by pressing the
- You can kill and recreate the producer and consumer threads by pressing the Restart button and start them with the Step button.
- The Delay and Continue buttons have no effects.
- The producer produces 20 jobs, the last 10 of them slowly.
- The consumer consumes 20 jobs, the first 10 of them slowly.
(Courtesy of http://web.engr.oregonstate.edu/~minoura/cs261/)