Skip to content

PedroArnaldo/Philosophers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 

Repository files navigation

Philosophers

The philosophers' dinner was proposed by Dijkstra in 1965 as a synchronization problem. The project aims to solve the philosophers' dinner problem and learn about concurrent programming using threads and mutex.

Install

git clone [email protected]:PedroArnaldo/philosophers.git

Usage

  1. cd philosophers && make
  2. Run the program passing the params
./philo num_of_philo time_to_die time_to_eat time_to_sleep num_times_must_eat

Examples

./philo 5 900 200 200 7 // Stop when all the philosopher has eaten of least 7 times each
./philo 4 310 200 200   // One philosopher dies
./philo 5 900 200 200 // No one should die

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published