Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/medidbella/philosophers
this project's goal is to solve the dining philosopher's problem using threads
https://github.com/medidbella/philosophers
dining-philosophers-problem multithreading mutex-synchronisation
Last synced: about 1 month ago
JSON representation
this project's goal is to solve the dining philosopher's problem using threads
- Host: GitHub
- URL: https://github.com/medidbella/philosophers
- Owner: medidbella
- Created: 2024-04-26T10:04:38.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-06-03T12:04:10.000Z (8 months ago)
- Last Synced: 2024-11-12T03:37:10.559Z (3 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.