https://github.com/ekkoz897/42cursus_philosophers
The goal of this project was to learn to avoid deadlock and race conditions when creating multithreaded applications.
https://github.com/ekkoz897/42cursus_philosophers
42 42-school 42born2code 42cursus 42projects 42school c phil philosophers philosophers-dinner-problem philosophers42
Last synced: 8 months ago
JSON representation
The goal of this project was to learn to avoid deadlock and race conditions when creating multithreaded applications.
- Host: GitHub
- URL: https://github.com/ekkoz897/42cursus_philosophers
- Owner: Ekkoz897
- Created: 2023-08-29T13:53:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-21T18:22:18.000Z (over 1 year ago)
- Last Synced: 2025-01-14T23:52:57.980Z (10 months ago)
- Topics: 42, 42-school, 42born2code, 42cursus, 42projects, 42school, c, phil, philosophers, philosophers-dinner-problem, philosophers42
- Language: C
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
42cursus_Philosophers
Basics of process threading, and how work on the same memory space.
---
Philosophers an individual project at [42](https://www.42.fr/42-network/) about introduction to the basics of process threading, and how work on the same memory space.
And learn about mutexes, semaphores, and shared memory.
## Introduction
In computer science, the dining philosophers problem is an example problem often used in concurrent algorithm design to illustrate synchronization issues and techniques for resolving them.
It was originally formulated in *1965 by Edsger Dijkstra* as a student exam exercise, presented in terms of computers competing for access to tape drive peripherals. Soon after, Tony Hoare gave the problem its present formulation
[More informations](https://en.wikipedia.org/wiki/Dining_philosophers_problem)
## Installation 🖥
To test the project, clone the repository and then run the command `make`. Then, you can test the project using the executable.
__usage :__
`./philo number_philosopher time_to_die time_to_eat time_to_sleep [number_of_time_each_philosophers_must_eat]`
arguments in square brackets are not required (number_of_time_each_philosophers_must_eat)
__example :__
`./philo_one 4 500 200 200`