Skip to content

🧐 Project for Codam that utilizes multi-threading and mutexes to simulate a table of philosophers eating, sleeping and thinking

License

Notifications You must be signed in to change notification settings

RubenNijhuis/Philosophers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Philosophers

🧐 Philosophers is a project for Codam (42 network) which teaches multithreading and the usage of mutexes

Quick start

$ make
$ make run

And watch as the philosophers dine and enjoy a nice meal

Running the program

The program only accepts positive integers and a maximum of 200 philosophers (not planning making your pc explode)

$ ./bin/philsophers [amount_philo] [time_to_die (ms)] [time_to_eat (ms)] [time_to_sleep  (ms)] [optional amount_times_eat]

Structure

/- Philosophers
    /- bin      # binary to be executed gets put here
    /- include  # .h files
    /- src      # project source
    Makefile # compiling magic happens here

Made with ❤️

About

🧐 Project for Codam that utilizes multi-threading and mutexes to simulate a table of philosophers eating, sleeping and thinking

Topics

Resources

License

Stars

Watchers

Forks