Skip to content

A program to simulate the philosophers dining problem

Notifications You must be signed in to change notification settings

rvan-mee/Philosophers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

philosophers

This is a slightly changed version of the classic philosophers dining problem. At launch you pass the values of the number of philosophers and their time to eat, sleep and time to die (in miliseconds) to the program.

The mandatory part of this subject (philo) if handled with threads and mutexes whilst the bonus (philo_bonus) works with proccesses and semaphores.

Installation and Usage

To create the executable:

cd philo | cd philo_bonus
make

To run the program:

./philo | ./philo_bonus [Number of philosophers] [time to die] [time to eat] [time to sleep] Optional: [Number of times each philosopher must eat]

About

A program to simulate the philosophers dining problem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published