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
- Host: GitHub
- URL: https://github.com/codophobia/producer-consumer-problem-solution-in-c
- Owner: codophobia
- Created: 2019-12-09T17:28:58.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-04T23:09:49.000Z (about 3 years ago)
- Last Synced: 2025-04-02T14:11:16.675Z (6 months ago)
- Topics: mutex, producer-consumer, semaphore, synchronization
- Language: C
- Homepage: https://shivammitra.com/c/producer-consumer-problem-in-c/#
- Size: 397 KB
- Stars: 18
- Watchers: 2
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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**
