An open API service indexing awesome lists of open source software.

https://github.com/anagmrebelo/42_philosophers

Precisely time a group of philosophers on when to pick up forks and eat spaghetti without dying from hunger
https://github.com/anagmrebelo/42_philosophers

42 common-core

Last synced: 8 months ago
JSON representation

Precisely time a group of philosophers on when to pick up forks and eat spaghetti without dying from hunger

Awesome Lists containing this project

README

          

# philosophers

## Project description:
Eat, Sleep, Think, repeat 🍽💤💭\
This project is about learning how threads work by precisely timing a group of philosophers on when to pick up forks and eat spaghetti without dying from hunger. Got familiarized with concepts of threading and forking a proces, mutexes and semaphores

## Grade
100%

## Usage

```make```\
```./a.out``` will take as parameters ```number_of_philosophers time_to_die time_to_eat time_to_sleep number_of_times_each_philosopher_must_eat```\
[number_of_times_each_philosopher_must_eat] is optional