Producer-consumer problem - Wikipedia, the free encyclopedia
The solution can be reached by means of inter-process communication, typically using semaphores. An inadequate solution could result in a deadlock where .
http://en.wikipedia.org/wiki/Producer-consumer_problem