Skip to content

Python project implementing simulation of Dining philosophers problem

License

Notifications You must be signed in to change notification settings

mldxo/dining-philosophers

Repository files navigation

Dining philosophers

The dining philosophers problem simulation implemented as PyPi package.

Usage

In order to build and use the package, you need to have Python 3.8 or higher installed.

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py

Results

After running the simulation, as the output you will see generated image representing 5 philosophers. Each philosopher's time is represented by a line connected with circles that denotes eating time. The line is colored in the philosopher's color. Empty bits represent thinking time. Red triangles represent situation where eating is not possible due to the lack of forks. The simulation is run for 100 seconds.

License

MIT

Authors

About

Python project implementing simulation of Dining philosophers problem

Topics

Resources

License

Stars

Watchers

Forks

Languages