In this project, you will learn the basics of threading a process. You will see how to create threads and you will discover mutexes.
git clone https://github.com/magnitopic/philosophers.git
cd philosophers/philo
make
Note: Times are measured in milliseconds.
./philo "number_of_philos" "time_to_die" "time_to_eat" "time_to_sleep" "times_a_philo_must_eat(optional)"
Normal execution
./philo 5 800 200 200
Every philo will eat 50 times
./philo 5 800 200 200 50
Example with some tight timing
./philo 5 310 103 103
Example using pipes to count number of times eaten. 5 philos times 7 times to eat, the result should be 35 at least
./philo 5 800 200 200 7 | grep "eating" | wc -l