The philosophers' dinner was proposed by Dijkstra in 1965 as a synchronization problem. The project aims to solve the philosophers' dinner problem and learn about concurrent programming using threads and mutex.
git clone [email protected]:PedroArnaldo/philosophers.git
cd philosophers && make
Run the program passing the params
./philo num_of_philo time_to_die time_to_eat time_to_sleep num_times_must_eat
./philo 5 900 200 200 7 // Stop when all the philosopher has eaten of least 7 times each
./philo 4 310 200 200 // One philosopher dies
./philo 5 900 200 200 // No one should die