Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/caglakahriman/dining-philosophers

Algorithm to solve the dining philosophers problem, written in C
https://github.com/caglakahriman/dining-philosophers

Last synced: 5 days ago
JSON representation

Algorithm to solve the dining philosophers problem, written in C

Awesome Lists containing this project

README

        

# Dining-Philosophers
Algorithm to solve the dining philosophers problem, written in C

"In computer science, the dining philosophers problem is an example problem often used in concurrent algorithm design to illustrate synchronization issues and techniques for resolving them."

Problem statement:
There is a fork between each plate. The dish served is a kind of spaghetti which has to be eaten with two forks. Each philosopher can only alternately think and eat. Moreover, a philosopher can only eat their spaghetti when they have both a left and right fork.

On this project I,
- handle multiple [threads](https://www.ibm.com/docs/en/cobol-zos/6.3?topic=multithreading-),
- handle multiple [mutexes](https://www.ibm.com/docs/en/i/7.1?topic=threads-mutexes),