Skip to content

aka-sps/dining-philosophers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 

Repository files navigation

philosophers Manual Page

Name

philosophers - simple c++11 demo of "Dining philosophers problem".

Synopsis

<path_to_build_dir>/philosophers <number_of_philosophers> <max_interval_ms>

See Wikipedia.

Command-line arguments

  • max_interval_ms number of philosophers/forks (default = 64)

  • max_interval_ms maximal interval eating/thinking state for philosophers in ms (default = 10000)

Legend

  • ' ' - thinking

  • '.' - waiting for forks

  • '|' - eating

  • '#' - dead (if enabled)

1. Build

1.1. CMake Configure

In your build directory

cmake <path_to_source_dir>

or

cmake -DCMAKE_TOOLCHAIN_FILE=<path_to_your_cmake_toolchain_file> <path_to_source_dir>

1.2. CMake build

cmake --build <path_to_build_dir>

About

Simple c++11 demo of "Dining philosophers problem"

Resources

Stars

Watchers

Forks

Packages

No packages published