In this project, I explored the concepts of threading and synchronization in programming through a practical implementation of the "Philosophers" problem. The goal was to simulate a scenario where philosophers sit at a table and think, but they need forks to eat. This project helped me understand how to manage multiple threads and avoid issues like deadlock and race conditions.
- Thread Creation: I learned how to create and manage threads in C, allowing multiple philosophers to think and eat simultaneously.
- Mutexes: I implemented mutexes to ensure that only one philosopher can use a fork at a time, preventing conflicts and ensuring safe access to shared resources.
- Memory Management: I ensured that all dynamically allocated memory was properly freed to avoid memory leaks, adhering to good programming practices.
- Norm Compliance: The project was developed following strict coding standards (Norm), ensuring clean and maintainable code.
This project not only improved my programming skills but also deepened my understanding of concurrency and synchronization in software development. It was a valuable experience that I am excited to share on GitHub!