Skip to content

C program that implements a multi-threaded counter system using pthreads and semaphores.

Notifications You must be signed in to change notification settings

elmahygurl/Semaphores

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Semaphores

Project overview

This C program implements a multi-threaded counter system using pthreads and semaphores.

The system consists of three types of threads: mMonitor, mCollector, and mCounter.

The mMonitor thread monitors the counts generated by mCounter threads at regular intervals and enqueues them into a buffer.

The mCollector thread dequeues values from the buffer and processes them. image

Objective:

  1. Familiarizing with concurrent programming.
  2. Handling races, synchronization, and deadlock conditions

Run

  • Navigate to directory
  • Run make
    make
    

Sample Run

image

About

C program that implements a multi-threaded counter system using pthreads and semaphores.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published