Skip to content

Algorithm using synchronous and asynchronous mutexes to solve the philosophers dinner problem

Notifications You must be signed in to change notification settings

anaximeno/DiningPhilosophers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dining Philosophers and Mutexes

This repo contains a piece of code in C that implements and solves the Dining Philosophers problem using the mutual exclusion property which can be used to control the access to critical sections on concurrent tasks.

Asynchronous

Build the asynchronous code using:

gcc -O3 -finline-functions asynchronous.c -pthread -o async

Then run with:

./async

Synchronous

Build the synchronous one using:

gcc -O3 -finline-functions synchronous.c -pthread -o sync

Run with:

./sync

About

Algorithm using synchronous and asynchronous mutexes to solve the philosophers dinner problem

Topics

Resources

Stars

Watchers

Forks

Languages