Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 817 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 817 Bytes

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