Basic process synchronisation using semaphores in linux demonstrated by special kind of Dining Philosophers problem
Project used POSIX semaphores to synchronise chopsticks among 6 philosophers sitting across a table.
See this
This repo contains a special form of this problem.
- There are only 3 chopsticks shared among the philosophers
- There are 4 chopsticks on the table
- First, the philospher has to pick up a chopstick from his side (from the 3 fixed ones)
- Then, he has to pick one from the 4 kept on table. There is no resourse hierarchy among these, nor any absolute posiition.
- Eat! Profit
The classic
branch contains the solution to the original classic problem
Areeb Jamal - @iamareebjamal