An interactive web-based simulation of the classic Sleeping Barber Problem from Operating Systems.
This project visually demonstrates synchronization concepts such as semaphores, mutex locks, bounded buffers, and process coordination using an engaging barber shop simulation.
The Sleeping Barber Problem is a classic synchronization problem introduced by Edsger Dijkstra.
A barber shop consists of:
- One barber
- One barber chair
- A waiting room with limited chairs
- If there are no customers, the barber falls asleep.
- When a customer arrives:
- If the barber is sleeping, the customer wakes him up.
- If the barber is busy and waiting chairs are available, the customer waits.
- If all waiting chairs are occupied, the customer leaves.
This problem is widely used in Operating Systems to demonstrate:
- Process synchronization
- Mutual exclusion
- Producer-consumer behavior
- Thread communication
- Resource sharing
- 🎨 Interactive user interface
- 💈 Barber sleep and wake animations
- 👥 Dynamic customer simulation
- 🪑 Waiting room visualization
- 📜 Real-time event logging
- 🔄 Reset simulation functionality
- 📚 Operating System analogy section
- HTML5
- CSS3
- JavaScript
- Font Awesome
Sleeping-Barber-Simulation/
│
├── index.html
├── styles.css
├── script.js
└── README.md