QP/C  7.4.0-rc.2
Real-Time Embedded Framework
Loading...
Searching...
No Matches
Dining Philosophers Problem (DPP)

Simple Blinky Application"Fly 'n' Shoot" Game

The Dining Philosophers Problem (DPP) example is an intermediate-level application with multiple active objects. It illustrates the following QP™ features, such as:

  • multiple active objects, including an array of active objects;
  • designing the simple state machines in the QM tool and generating the code automatically (can be also done manually);
  • using multiple periodic time events;
  • using mutable events with parameters;
  • direct event posting to active objects;
  • publish-subscribe event delivery;
  • initializing the QP™ framework;
  • starting multiple active objects; and
  • transferring control to QP™ to run the application.

Built-in kernels:

  • non-preemptive QV kernel;
  • preemptive, non-blocking QK kernel;
  • dual-mode, blocking/non-blocking QXK kernel (for ARM Cortex-M);

Build configurations:

  • debug configuration (default)
  • release configuration
  • spy (software tracing) configuration

The DPP example is provided for most supported boards as well as in the command-line version (on the host). Please look for examples named dpp_<board-name> in the qpc /examples/examples directory (e.g., qpc /examples/arm-cm/dpp_ek-tm4c123gxl for the EK-TM4C123GXL board (TivaC LaunchPad)).

The Dining Philosophers Problem (DPP) example is described in the Application Note: Dining Philosophers Problem (DPP) Example .

Application Note: Dining Philosophers Problem (DPP) Example
Note
There is also a DPP variant that implements the "Philosophers" as passive "Orthogonal Components" of the "Table" active object. That DPP version is located in qpc /examples/examples/workstation/dpp-comp/

Simple Blinky Application"Fly 'n' Shoot" Game