The Unbounded Buffer for the Producers and Consumers. The Producers and Consumers Driver. Bounded buffers can be used to communicate information from one thread to another in a pipeline . A Pipeline Using Bounded Buffers. A barber waits to cut hair.
Customers enter the waiting room and take a seat if one is available.
If the waiting room is full, they try again later. Otherwise, they wait until their turn for a hair cut. The Sleeping Barber. Five philosophers sit around a table and think until hungry. Interspersed between the philosophers are five forks.