Skip to content

Amorgan27/CS33211

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CS33211

My name is Annika Morgan is this a program that uses a producer and a consumer with a shared buffer. This program also uses semaphores to get into the critical section.

This code contains three files in the C++ programming language. The producer.cpp contains the code for the producer and the the second file consumer.cpp contains the code for the consumer. The last file is the shared.hpp

To run the program you need to comiple it using three commands g++ producer.cpp -pthread -lrt -o producer g++ consumer.cpp -pthread -lrt -o consumer ./producer & ./consumer &

My problems: I was having trouble figuring out the shared memory and learning how to use semaphores to access the critical section.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages