Skip to content

nelisabe/philosophers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

philosophers

This project represents the solution of dining philosophers problem, but with any number of philosphers.

Description

Each directory "philo_*" contains solution with some differences in approach:

• philo_one - using threads and mutexes

• philo_two - using threads and semaphores

• philo_three - using processes and semaphores.

Build

  1. cd to philo_* directory;
  2. make creates executable named "philo_number".

To remove all files created by program run make fclean, or make clean to remove all except executable.

Usage

Program arguments: number_of_philosophers time_to_die time_to_eat time_to_sleep [number_of_times_each_philosopher_must_eat], time in ms.

For example ./philo_one 4 500 100 100

ezgif com-gif-maker(4)

About

Solution of dining philosophers problem

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published