Skip to content

ribana-b/Philosophers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Philosophers

Preview

output.webm

Description

Philosophers (Dining philosophers problem) is a project where the goal is to let n amount of philosophers eat indefinitely without dying. Each philosopher must take forks to be able to eat, then sleep, and then think whenever they're not eating nor sleeping. By achieving the goal, we adquire knowledge about concurrency problems such as deadlocks and data races and how to deal with them.

Usage

Clone the repository and build the program

git clone https://github.com/ribana-b/philosophers
cd philosophers/philo
make -j4

Run the program

./philo 10 800 200 200 2

Note

Parameter Value range
number of philosophers 1-200
time to die 60-999999
time to eat 60-999999
time to sleep 60-999999
number of meals per philosopher (optional) 0-999999

Progress

If you are interested in checking my progress in 42 Common Core, I suggest you to take a look at My Common Core Projects

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published