zephyr/samples/microkernel/apps/philosophers/README.txt
Peter Mitsis 4ebd11258c Remove references to Simics from README.txt files
Simics is not supported.  As such, the sample project README.txt files must
not provide instructions on how to execute an image using Simics.

Change-Id: I6cc09169902b5e10f50799c280d0bbc63f1ae624
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:48 -05:00

51 lines
1.3 KiB
Plaintext

Title: philosopher
Description:
An implementation of a solution to the Dining Philosophers problem
(a classic multi-thread synchronization problem). This particular
implementation demonstrates the usage of microkernel task groups,
Mutex APIs and timer drivers from multiple (6) tasks.
The philosopher always tries to get the lowest fork first (f1 then f2).
When done, he will give back the forks in the reverse order (f2 then f1).
If he gets two forks, he is EATING. Otherwise, he is THINKING.
Each philosopher will randomly alternate between the EATING and THINKING
states.
--------------------------------------------------------------------------------
Building and Running Project:
This microkernel project outputs to the console. It can be built and executed
on QEMU as follows:
make pristine
make microkernel.qemu
--------------------------------------------------------------------------------
Sample Output:
Philosopher 0 EATING
Philosopher 1 THINKING
Philosopher 2 THINKING
Philosopher 3 EATING
Philosopher 4 THINKING
Philosopher 5 THINKING
Demo Description
----------------
An implementation of a solution to the Dining Philosophers problem
(a classic multi-thread synchronization problem). This particular
implementation demonstrates the usage of multiple (6) tasks
of differing priorities and the nanokernel semaphores and timers.