Skip to content

mark-burg/Producer-Consumer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Operating Systems: Consumer-Producer

This code implements a producer and consumer program that communicate through a bounded buffer in shared memory.

Compilation:

gcc producer.c -lrt -o producer gcc consumer.c -lrt -o consumer

Running:

The producer program (parent) takes the following three command-line arguments (all integers):

  1. The size of the bounded buffer (bufSize). This is the number of items that can fit in the bounded buffer. Valid range is (2, 500)
  2. The number of items to produce/consume (itemCnt).
  3. A seed for the random number generator (randSeed).

About

Producer-consumer implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages