Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 703 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 703 Bytes

Philosophers

Making the philosophers game, using threads and mutexes.

To run

To run the project, you have to add 4 of 5 arguments.

  • arg 1: number of philosophers.
  • arg 2: time a philosopher can live without eating.
  • arg 3: time a philosopher needs to eat.
  • arg 4: time a philosopher needs to sleep.
  • arg 5: number of meals the philosophers need to eat (optional).
    • without specifying arg 5 the program runs till a philosopher dies.

Progress

For this project I learned to use threads and mutexes. In addition, I tried out VIM as a text editor and will use it as my go-to text editor. Last, I wrote short explanations for functions for the first time. Will keep doing this from now on.