From a consumer-producer problem
– Two processes (the producer and the consumer) who share
a common buffer
• The producer’s job is to generate a piece of data, put it into the
buffer and start again
• The consumer’s job is to consume the data (i.e., remove it from the
buffer) one piece at a time
• The problem
– The producer won’t try to add data into the buffer if it’s full
– The consumer won’t try to remove from an empty buffer