https://github.com/medidbella/philosophers
this project's goal is to solve the dining philosopher's problem with a multi threaded approach
https://github.com/medidbella/philosophers
dining-philosophers-problem multithreading mutex-synchronisation
Last synced: 4 months ago
JSON representation
this project's goal is to solve the dining philosopher's problem with a multi threaded approach
- Host: GitHub
- URL: https://github.com/medidbella/philosophers
- Owner: medidbella
- Created: 2024-04-26T10:04:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-03T12:04:10.000Z (about 1 year ago)
- Last Synced: 2025-01-10T23:20:00.870Z (6 months ago)
- Topics: dining-philosophers-problem, multithreading, mutex-synchronisation
- Language: C
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
this project's goal is to solve the dining philosopher's problem using threads
[look up =>](https://en.wikipedia.org/wiki/Dining_philosophers_problem)
>-----the program arguments:-----<
number_of_philosophers time_to_die time_to_eat time_to_sleep [ number_of_times_each_philosopher_must_eat ]
◦ number_of_philosophers: The number of philosophers and also the number of forks.
◦ time_to_die (in milliseconds): If a philosopher didn’t start eating time_to_die milliseconds since the beginning of their last meal
or the beginning of the simulation, they die.◦ time_to_eat (in milliseconds): The time it takes for a philosopher to eat. During that time, they will need to hold two forks.
◦ time_to_sleep (in milliseconds): The time a philosopher will spend sleeping.
◦ number_of_times_each_philosopher_must_eat (optional argument): If all philosophers have eaten at least number_of_times_each_philosopher_must_eat times,
the simulation stops. If not specified, the simulation stops when a philosopher dies.