Concurrency

Semaphores Visualizer

Explore P()/V() operations and the classic Dining Philosophers deadlock problem.

Deadlock Avoider Game

Score: 0
Deadlocks: 0
Meals: 0

Select a hungry philosopher and click Give Forks to let them eat. Prevent deadlock by ensuring at most 4 philosophers hold forks simultaneously!

🍽️ Dining Philosophers

5 philosophers sit around a table. Each needs 2 forks to eat. Each fork is shared between two adjacent philosophers — a classic deadlock scenario!

🍝
SHARED TABLE
💭 Thinking 😋 Hungry 🍽️ Eating 💀 Deadlock
Philosopher State Left Fork Right Fork Meals Eaten

📋 Semaphore Operations Log

Events will appear here...

🔧 Controls

🔑 Fork Semaphores

Each fork is a binary semaphore (0 = taken, 1 = free).