Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 887 Bytes

File metadata and controls

18 lines (12 loc) · 887 Bytes
philosophersn

⏳ Philosophers

This project is a simulation of the classic Dining Philosophers problem, a concurrency challenge. Each philosopher is a thread and must follow rules around eating, thinking, sleeping, and not dying.

🔧 Project Details

  • Each philosopher alternates between eating, sleeping, and thinking.
  • They need two forks (mutexes) to eat.
  • If a philosopher doesn't eat within a time threshold, they die.
  • There must be no data races
  • There has to be no unlocks of already unlocked mutexes
  • Number of philosophers = number of forks
  • Philosophers cannot share information with each other
dining-phil