-
Notifications
You must be signed in to change notification settings - Fork 0
mikeweber/Dining-Philosophers
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Dining Philosophers =================== To run, simply call `ruby philosophers.rb`. After each state change, the current state of the table will be printed, with a '!' representing an available chop-stick, a '|' representing a chop-stick in use and a 'O' representing a philosopher. e.g. ' |O !' would be printed when a philosopher is using her chopstick on the left, but not using the one on her right. The program will continue until the whole process is deadlocked. NOTE: The printing of the table is not synchronized, so it is possible to print a chop-stick as in use if the print method is called while the chop-stick is changing states.
About
A Ruby implementation of the classic multi-process synchronization problem
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published