Two solutions to the problem of dining philosophers.
-In the first case philosophers are threads and forks are in between them.
-In the second case philosophers are processes and forks are in the middle of the table.
Task definition: subject
This project is written according to the Norm.
- Type "make" in one of two directories
- Execute ./philo 'num_of_philos' 'time_to_die' 'time_to_eat' 'time_to_sleep' ['num_of_meals']
- 'num_of_philos' is the number of philosophers and the number of forks
- 'time_to_die' ms is the time in which the philosopher will die if he does not eat
- 'time_to_eat' ms is the time it takes for a philosopher to eat
- 'time_to_sleep' ms is the time it takes for a philosopher to sleep after eating
- 'num_of_meals' [optional] is the number of meals to get one philosopher full;
once all the philosophers are full, the simulation stops