9. Phil Sample Application

The Phil sample application demonstrates multi-tasking by using the CNDP cthread API and provides two solutions to Dijkstra’s famous dining philosopher’s problem, 1) a ticket-based one and 2) a claim-based one. The cthread library provides a cooperative multi-tasking environment that runs in userspace on a single pthread.

9.1. Running the Application

After building CNDP, run the example:

$ ./builddir/examples/phil/phil -c examples/phil/phil.jsonc