In computing, the producer-consumer problem (also known as the bounded-buffer problem) is a family of problems described by Edsger W. Dijkstra since 1965.
- The Producer-Consumer problem is a classic synchronization problem in operating systems.
- The problem is defined as follows: there is a fixed-size buffer and a Producer process, and a Consumer process.
- The Producer process creates an item and adds it to the shared buffer. The Consumer process takes items out of the shared buffer and “consumes” them.
The producer-consumer problem will be implemented as a Pizzeria where the producer will handle the process to make the pizzas in background while the consumer will report the successful (deliver) or failed (angry customers) pizzas.