Skip to content

Basic process synchronisation using semaphores in linux demonstrated by special kind of Dining Philosophers problem

License

Notifications You must be signed in to change notification settings

iamareebjamal/semaphores-example

Repository files navigation

Dining Philosophers using Semaphores

Codacy grade License

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

Description

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

classic branch

The classic branch contains the solution to the original classic problem

Author

Areeb Jamal - @iamareebjamal

About

Basic process synchronisation using semaphores in linux demonstrated by special kind of Dining Philosophers problem

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published