{"id":21722625,"url":"https://github.com/shexweeknd/42-cursus-philosophers","last_synced_at":"2025-03-20T22:14:28.726Z","repository":{"id":250703829,"uuid":"835083907","full_name":"shexweeknd/42-cursus-Philosophers","owner":"shexweeknd","description":"This is a project for the 42 cursus that focuses on the dining philosophers problem. The goal of this project is to implement a solution to the problem using multithreading and synchronization techniques while writing a C program","archived":false,"fork":false,"pushed_at":"2024-09-29T17:56:06.000Z","size":1078,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T19:07:45.933Z","etag":null,"topics":["42","42antananarivo","42born2code","42cursus","42projects","c","hramaros","mutex-synchronisation","os","philosophers","philosophers-dinner-problem","philosophers42","thread"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shexweeknd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-29T06:07:23.000Z","updated_at":"2024-09-30T07:47:27.000Z","dependencies_parsed_at":"2024-11-26T03:15:11.060Z","dependency_job_id":null,"html_url":"https://github.com/shexweeknd/42-cursus-Philosophers","commit_stats":null,"previous_names":["shexweeknd/42-cursus-philosophers"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shexweeknd%2F42-cursus-Philosophers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shexweeknd%2F42-cursus-Philosophers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shexweeknd%2F42-cursus-Philosophers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shexweeknd%2F42-cursus-Philosophers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shexweeknd","download_url":"https://codeload.github.com/shexweeknd/42-cursus-Philosophers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244700594,"owners_count":20495574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42","42antananarivo","42born2code","42cursus","42projects","c","hramaros","mutex-synchronisation","os","philosophers","philosophers-dinner-problem","philosophers42","thread"],"created_at":"2024-11-26T02:30:40.506Z","updated_at":"2025-03-20T22:14:28.708Z","avatar_url":"https://github.com/shexweeknd.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 42 Philosophers Project\n\n![example of execution](https://github.com/shexweeknd/blob/blob/main/42-cursus-Philosophers/42-cursus-Philosophers-din.png)\n\nThis is a project for the 42 cursus that focuses on the dining philosophers problem. The goal of this project is to implement a solution to the problem using multithreading and synchronization techniques while writing a `C` program.\n\n## Table of Contents\n\n- [42 Philosophers Project](#42-philosophers-project)\n  - [Table of Contents](#table-of-contents)\n  - [Introduction](#introduction)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Introduction\n\nThe dining philosophers problem is a classic synchronization problem in computer science. It involves a group of philosophers sitting around a table, where each philosopher alternates between thinking and eating. The problem arises when each philosopher requires two forks to eat, but there are only a limited number of forks available.\n\nIn this project, we aim to solve this problem by implementing a solution using threads and mutex locks.\n\n## Installation\n\nBefore any installation, make sure you are unsing an LTS stable Linux version that compiles C programs with `cc` compiler. If not, proceed with the following command on your terminal in order to install `cc` compiler:\n\n`sudo apt install cc`\n\nTo install and run the philosophers project, follow these steps:\n\n1. Clone the repository:\n```sh\ngit clone https://github.com/shexweeknd/42-cursus-Philosophers.git\n```\n\n2. Navigate to the project directory:\n```sh\ncd 42-cursus-Philosophers/philo\n```\n\n3. Compile the project with the command:\n```sh\nmake\n```\n\n4. Run the program:\n```sh\n./philo [number_of_philosophers] [time_to_die] [time_to_eat] [time_to_sleep] [number_of_times_each_philosopher_must_eat]\n```\n\n## Usage\n\n![example of execution](https://github.com/shexweeknd/blob/blob/main/42-cursus-Philosophers/42-cursus-Philosophers-eg.png)\n\nOnce the program is running, the philosophers will start their dining process. The program will output the actions of each philosopher, such as when they start eating, finish eating, start sleeping, etc. The program will terminate when a philosopher dies or when all philosophers have eaten the required number of times.\n\n## Contributing\n\nContributions to the philosophers project are welcome. If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.\n\n## License\n\n![42](https://github.com/shexweeknd/blob/blob/main/42-cursus-Philosophers/42-cursus-Philosophers-42-logo.png)\n\nThis project is from 42 School Common Core Cursurs. I do not own any of the concept mentionned above. Instead I own the provided code in the repository.\n\nLicensed under the [MIT License](https://github.com/shexweeknd/blob/blob/main/LICENSE).\n\n## Acknowledgments\n\n- 42 Network for providing the project.\n- Axian Group\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshexweeknd%2F42-cursus-philosophers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshexweeknd%2F42-cursus-philosophers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshexweeknd%2F42-cursus-philosophers/lists"}