Dining Philosopher Problem - in the easy way. We have five philosopher sitting around a table and they are either thinking or eating. There is rice on the table, but there are only five chopsticks - and one need two of them for eating. In this easy treatment ANY two of the five chpsticks can be used for eating - if we can acquire them. The five chopsticks are represented by a 5-slots semaphore (a semaphore counting from 0 to 5). The philosophers are represented as threads.
mbed-rtos.lib@0:abf1becf9617, 2016-02-10 (annotated)
- Committer:
- icserny
- Date:
- Wed Feb 10 12:46:34 2016 +0000
- Revision:
- 0:abf1becf9617
First version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
icserny | 0:abf1becf9617 | 1 | http://mbed.org/users/mbed_official/code/mbed-rtos/#3d9d2b8b8f17 |