This is a project specification for a programming assignment involving simulating a dining philosophers problem.
The simulation consists of several philosophers sitting at a round table with a plate in front of them. The philosophers alternate between eating, thinking, and sleeping. While eating, they cannot think or sleep, while thinking, they cannot eat or sleep, and while sleeping, they cannot eat or think. There are as many forks on the table as there are philosophers, and each philosopher requires two forks to eat. When a philosopher finishes eating, they put their forks back on the table and start sleeping. Once awake, they start thinking again. The simulation stops when a philosopher dies of starvation.
The problem of dining philosophers highlights the challenge of avoiding deadlock, a state where no progress is possible.
gcl https://github.com/trobert42/philosophers.git
cd philosophers
make
./philo [number_of_philosophers] [time_to_die time_to_eat] [time_to_sleep] [number_of_times_each_philosopher_must_eat]