Skip to content
/ philo Public

Implementation of the Dining Philosophers problem using threads and mutexes in C. 42 project.

Notifications You must be signed in to change notification settings

AlexLav3/philo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

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

About

Implementation of the Dining Philosophers problem using threads and mutexes in C. 42 project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published