This project is a training exercise in multi-threading and multi-processing programming, focusing on the use of mutex and semaphore synchronization mechanisms. It simulates a variation of the well-known Dining Philosophers problem, implementing three different programs with the same basic rules.
philo_one: Multi-threaded implementation using mutex for synchronization. philo_two: Multi-threaded implementation using semaphore for synchronization. philo_three: Multi-process implementation using semaphore for synchronization.
The objective of this project is to explore the challenges of concurrent programming, specifically in scenarios involving shared resources and the need for synchronization. By implementing the Dining Philosophers problem, we learn to efficiently utilize mutex and semaphore mechanisms to ensure the proper execution and survival of the philosophers.
In addition to mastering multi-threading and multi-processing concepts, this project also emphasizes the importance of C optimization. It pushes us to carefully manage CPU usage, striving to minimize overhead and maximize efficiency in order to create a robust and effective solution.
To run any of the programs, follow the instructions provided in the respective project directories. Each program has its own set of specific requirements and steps for execution. Make sure to read the README file in each program directory for detailed instructions.
Contributions to this project are not currently accepted as it is intended for educational purposes. However, feel free to fork the repository and experiment with your own modifications and improvements.
This project is licensed under the MIT License. Feel free to use, modify, and distribute it as permitted by the license.
Special thanks to the instructors and staff who provided guidance and support throughout the development of this project.