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.
Philosophers aims to showcase a correct synchronization of threads (C threads) using mutex_lock to prevent data races, while also preventing the deadlock.
Provide the simulation parameters respectively as follows :
./philo "number of philosophers" "maximum time wihtout eating to die" "time each philosopher will spend sleeping".
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/)