/Philosophers

The classic philosophers problem.

Primary LanguageC

Philosophers

My take on the classic Philosophers problem.

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.

How to run?

The philo program takes 4 or 5 arguments:

./philo <number_of_philos> <time_to_death> <time_to_eat> <time_to_sleep> [number_of_times_each_philosopher_must_eat]