An open API service indexing awesome lists of open source software.

https://github.com/codophobia/producer-consumer-problem-solution-in-c

Producer-consumer problem solution using semaphore and mutex
https://github.com/codophobia/producer-consumer-problem-solution-in-c

mutex producer-consumer semaphore synchronization

Last synced: 5 months ago
JSON representation

Producer-consumer problem solution using semaphore and mutex

Awesome Lists containing this project

README

          

# Multi Prodcuer-Consumer Problem Solution Using Semaphore and Mutex

Blog: https://shivammitra.com/c/producer-consumer-problem-in-c

The producer-consumer problem is one of the classical examples of synchronization. This program simulates a multi producer-consumer problem in C.

Compiling the program: gcc producer-consumer.c -pthread

Running the program: ./a.out

**Output**

![output](output.png)