
Eat, Sleep, Spaghetti, repeat. This project is about learning how threads work by precisely timing a group of philosophers on when to pick up forks and eat spaghetti without dying from hunger.
The Philosophers project challenges students to solve the Dining Philosophers problem, a classic synchronization and resource sharing challenge in computer science. The goal is to create a program that simulates philosophers dining together, where each philosopher needs two forks to eat, and must avoid deadlocks and starvation.
Visualization of ./philo 21 700 200 300 7
- Simulate philosophers dining at a round table with forks between them
- Each philosopher must eat, sleep, and think in a specific order
- No philosopher should die from starvation
- Each fork can only be used by one philosopher at a time
- Proper handling of shared resources using mutexes and threads
- Accurate timing of actions using millisecond precision
- Multi-threading programming
- Mutex and semaphore usage
- Resource sharing and synchronization
- Deadlock prevention
- Race condition handling
- Performance optimization
- Time management in concurrent programming
