This was a group project where we had to make an OS simulator. I was assigned the synchronisarion algorithms. The following algorithms were implemented,
- Producer Consumer - This problem is faced when two processes use the same resource buffer. This is solved by using a mutex lock. Proper visualisation has been implemented in the simulator.
- Dining Philosopher - The problem arises when every philospher waits for every other philosopher to drop the fork, hence resulting in a lockdown. This is solved by allowing the philosopher to pick the fork only when boht the forks are available to be picked up.
- Barrier Semaphore - This is experienced when multiple threads work together to solve a common problem but to proceed, each thread has to reach a pre defined barrier.
- Reader-Writer - Here the problem of concurrent resource access is experienced. Writing while there are stll readers left is not allowed.
- Sleeping Barber - This is a classic inter process communication problem. Please refer the visualisation for the solution
Steps to start the simulator,
- Clone the repository.
- Open the "Indes.html" inside the Synchronisation folder.