/Philosophers

I never thought philosophy would be so deadly

Primary LanguageCMIT LicenseMIT

Philosophers

A way to learn the basics of threading a process, and discover how to create threads and explore mutexes.

Compiling:

First run the make command to compile all necessary files, on either the bonus or mandatory part.

$ /philo > make

$ /philo_bonus > make

Usage:

To start a simulation of the dining philosophers problem, execute the program ./philo followed by the number of philosophers as a first argument, time to die (in ms), time to eat, time to sleep, and a number of times each philosopher must eat (last one optional). Exampel:

Based on the arguments the simulation would either continue going infintly or a philosopher would die, or stop when reached the number of time to eat.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author