Welcome to the Dining Philosophers Problem Solution Repository! This project provides a robust solution for the classic dining philosophers problem by implementing thread synchronization techniques using semaphores and mutex.
The repository offers two distinct solutions:
- Synchronous Solution: Utilizes an orchestrator that scans the philosophers from a dedicated thread, ensuring synchronization.
- Asynchronous Solution: Employs an orchestrator that is called only when necessary, optimizing performance.
Within the project, you'll find a variety of orchestrator functions. These were the stepping stones in the development process, showcasing the evolution of the algorithm. While some versions may not be optimal, they remain in the script to provide valuable insights into the progression and thought process behind the final algorithm.
Even though the earlier versions might not represent the ideal approach, they have been retained in the script. This decision was made to facilitate a deeper understanding of the final algorithm. By reviewing the reflection path and the challenges encountered during development, users can gain valuable insights into the project's evolution.
Contributions and feedback are highly encouraged. If you have suggestions for improvements, optimizations, or alternative approaches, feel free to contribute to the project.
Happy coding!