10000 GitHub - real-rookie/Producer-Consumer-Problem
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

real-rookie/Producer-Consumer-Problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This program solves the Producer-Consumer problem by using two semaphores and a mutex. One of the semaphores is for counting available spots in the shared data structure, and the other is for counting taken spots. The mutex is to prevent the producer/consumer from writing/reading the shared data structure simultaneously. When the producer is done, a poison pill is written to the shared data structure to terminate the consumer.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0