Problem of dining philosophers in C with monitors
C Objective-C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information. README typo Jul 30, 2013
diningphilos.c working sourcecode Jun 23, 2013
diningphilos.h working sourcecode Jun 23, 2013
monitor.c working sourcecode Jun 23, 2013

Dining Philos

I had to do this as university labwork a while ago so I thought I might as well publish it. The task was to implement the problem of dining philosophers in C. We had to use the monitor concept which is implemented with mutual exclusion (mutex) from the pthread-library because C lacks a built-in monitor function. The communication from one philosopher to another was realized with condition variables(cond-vars). The realisation of thinking and eating should be done by to empty loops that go to a huge number(so it takes a while even on todays computers). A debug printout should be implemented as well to control everything is working as expected.


Flattr this git repo