Skip to content

Final grade: 100% | 42 school level 4 project. Simulate the lives of philosophers with multi-thread and mutex.

Notifications You must be signed in to change notification settings

Sur1ive/42tokyo_Philosophers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 

Repository files navigation

Philosophers

Final grade: 100%

Multi-thread with mutex.

Review:

  • Do not test with more than 200 philosophers.
  • Do not test with time_to_die or time_to_eat or time_to_sleep set to values lower than 60 ms.
  • Test 1 800 200 200. The philosopher should not eat and should die.
  • Test 5 800 200 200. No philosopher should die.
  • Test 5 800 200 200 7. No philosopher should die and the simulation should stop when every philosopher has eaten at least 7 times.
  • Test 4 410 200 200. No philosopher should die.
  • Test 4 310 200 100. One philosopher should die.
  • Test with 2 philosophers and check the different times: a death delayed by more than 10 ms is unacceptable.
  • Test with any values of your choice to verify all the requirements. Ensure philosophers die at the right time, that they don't steal forks, and so forth.

NOTICE

42 Project must be written in accordance with the 42 school norm, otherwise the grade is 0:

  • Declarations must be at the beginning of a function
  • Declaration and an initialisation cannot be on the same line
  • Each function cannot have more than 25 lines of code
  • You can only use allowed functions
  • ...

English: https://github.com/42School/norminette/blob/master/pdf/en.norm.pdf
Japanese: https://github.com/42School/norminette/blob/master/pdf/ja.norm.pdf

About

Final grade: 100% | 42 school level 4 project. Simulate the lives of philosophers with multi-thread and mutex.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published