Skip to content
Search

Producer–consumer problem

lastmod 2018-08-17created 2016-08-052 edits

The producer-consumer problem is a classic problem about how to synchronize multiple processes. It is also called the bounded-buffer problem.

Multiple producers and consumers access a storage area (buffer) that temporarily holds a finite number of items (data). When a producer makes an item, it stores it in that space. At this point, there may be no space left to store it. When a consumer needs an item, it takes one from the storage area. At this point, there may be no item left to consume.

See also

Favorite site