Skip to content

shreyanshmohnot/mpmc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiple Producer Multiple Consumer Problem by SHREYANSH MOHNOT

An full implementation of multiple producer and consumer problem with semaphore library and circular ring buffer for buffering of items. Semaphore implementation using pthread mutex and condition variables. Using three semaphore for implementation of this problem.
Semaphore Mutex, Semaphore Empty & Semaphore Fill.

How to run my program - 

Steps --

1. Pull from github.com/shreyanshmohnot/mpmc.git

2. If zip then extract.

3. On terminal run "make" for compilation and linking with libraries.

4. Then ./mpmc (N_P)(N_C)(SLEEP)(ITEMS)(BUFFER) 
N_P = Number of Producers
N_C = Number of Consumers
SLEEP = Total Sleep Seconds
ITEMS = Items to produce for producer
BUFFER = Circular Ring Buffer Size

5. It requires five arguments to run successfully.

Thanks for viewing.

Releases

No releases published

Packages

No packages published