walywest / Philo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Concurrent Programming.

Eat, Sleep, Spaghetti, repeat. This project is about learning how threads work by precisely timing a group of philosophers on when to pick up forks and eat spaghetti without dying from hunger.

Objectives

Philosophers aims to showcase a correct synchronization of threads (C threads) using mutex_lock to prevent data races, while also preventing the deadlock.

Usage :

Provide the simulation parameters respectively as follows :

./philo "number of philosophers" "maximum time wihtout eating to die" "time each philosopher will spend sleeping".

alt text

For more informations

This project is a simulation of a problem known as Dining Philosophers problem.

Take a look at this (https://dotnettutorials.net/lesson/atomic-operations-in-c/)

About


Languages

Language:C 97.4%Language:Makefile 2.6%