zephyr/samples/nanokernel/apps/philosophers
Sergio Rodriguez 2e2ad8166e qemu: Creation of QEMU specific platforms
Setting up new platforms to handle emulation, and make them the only
ones able to run on QEMU from the Makefile "qemu" target to avoid
confusion with other platforms. We have now platform qemu_x86 and
platform qemu_cortex_m3, also modification to the sanity checks to have
qemu support only on those platforms

Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Change-Id: I9291918a1d58fea4f37750ada78234628f9a5d98
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:56 -05:00
..
Makefile qemu: Creation of QEMU specific platforms 2016-02-05 20:24:56 -05:00
README.txt Update Title in sample project README.txt files 2016-02-05 20:15:21 -05:00
prj_arc.conf samples: remove explicit enabling of SW_ISR_TABLE/DYNAMIC 2016-02-05 20:13:45 -05:00
prj_arm.conf samples: remove explicit enabling of SW_ISR_TABLE/DYNAMIC 2016-02-05 20:13:45 -05:00
prj_x86.conf
testcase.ini initial commit for next-gen sanity checks 2016-02-05 20:14:42 -05:00

README.txt

Title: Dining Philosophers

Description:

An implementation of a solution to the Dining Philosophers problem
(a classic multi-thread synchronization problem).  This particular
implementation demonstrates the usage of nanokernel semaphores and
timers from multiple (6) fibers.

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 state.

--------------------------------------------------------------------------------

Building and Running Project:

This nanokernel project outputs to the console.  It can be built and executed
on QEMU as follows:

    make qemu

--------------------------------------------------------------------------------

Troubleshooting:

Problems caused by out-dated project information can be addressed by
issuing one of the following commands then rebuilding the project:

    make clean          # discard results of previous builds
                        # but keep existing configuration info
or
    make pristine       # discard results of previous builds
                        # and restore pre-defined configuration info

--------------------------------------------------------------------------------

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) fibers
of differing priorities and the nanokernel semaphores and timers.