tags: multiprocessing multithreading threads deadlocks race-condition

Producer Consumer Problem

This is a synchronization issue in multiprocessing and multithreading. In this problem, there are two types of processes or threads accessing a single resource or buffer.

This problem occur when both of the process try to access the buffer at the same time causing data inconsistencies, deadlocks etc.

To solve these problem, there are various techniques are used. One of them is semaphores.