https://github.com/biralavor/42_philosophers
WIP - a classic multithread program to learn how to avoid data race and deadlock issues
https://github.com/biralavor/42_philosophers
42projects 42school datarace deadlock philosophers-dinner-problem thread
Last synced: 5 months ago
JSON representation
WIP - a classic multithread program to learn how to avoid data race and deadlock issues
- Host: GitHub
- URL: https://github.com/biralavor/42_philosophers
- Owner: biralavor
- License: mit
- Created: 2024-10-17T17:34:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-25T22:37:37.000Z (over 1 year ago)
- Last Synced: 2025-01-25T22:38:14.249Z (over 1 year ago)
- Topics: 42projects, 42school, datarace, deadlock, philosophers-dinner-problem, thread
- Language: C
- Homepage:
- Size: 312 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 42_philosophers
|  | A classic multithread program
to learn how to avoid
`data racing` and `dead lock` issues |  |
| :-: | :-: | :-: |
## My take-aways about Philosophers project are:
## How to run:
Here is a few pre-setup possibilities. Note that all of them are adding the `args_to_test` variable as an argument to run `./philo`
- `make go` :: **Let's Go mode**
- For checking how the threads are running, without changes.
- `make gdb` :: **GNU DeBugger mode**
- For debugging propuses, with a lot of pre-setup executables, like `run`, breakpoint at `main`, and `set args`.
- `make val` :: **Valgrind mode**
- For checking memory leaks, this will calls valgridn with a lot of options.
- `make hel` :: **Helgrind mode**
- For checking Threads errors, this will calls valgrind with the `helgrind` tool activated.
- `make drd` :: **Data Race Detector - DRD mode**
- For checking Data Race errors from Threads, this will calls valgrind with the `drd` tool activated.
- `make sani_t` :: **Fsanitize for Threads mode**
- For checking various forms of undefined or suspicious behaviors, switching to `threads` mode.
- `make sani_a` :: **Fsanitize for Address mode**
- For checking various forms of undefined or suspicious behaviors, switching to `address` mode.
