sociallyencrypted / Dining-Philosophers

Solutions to various modifications to the Dining Philosopher's problem in C, written for the course CSE231: Operating Systems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dining-Philosophers

This assignment tries to solve two variations of the dining philosophers by using strict ordering and semaphores on each variation.

  1. Five Philosophers, Five Forks
  2. Five Philosophers, Five Forks, Two Bowls

Installation

Clone this repo, cd into it, and run:

make

This will generate the binaries for all variations.

Usage

You can run the first variation, strictly ordered, by running:

bin/forksA

You can run the second variation, strictly ordered, by running:

bin/soupA

You can run the first variation, semaphores, by running:

bin/forksB

You can run the second variation, semaphores, by running:

bin/soupB

References

OSTEP Chapter on Semaphores

About

Solutions to various modifications to the Dining Philosopher's problem in C, written for the course CSE231: Operating Systems


Languages

Language:C 96.4%Language:Makefile 3.6%