{"id":25394894,"url":"https://github.com/azersd/extended-dining-philosophers","last_synced_at":"2026-07-22T11:02:17.361Z","repository":{"id":157296477,"uuid":"610359527","full_name":"AzerSD/Extended-Dining-Philosophers","owner":"AzerSD","description":"Extends the classic Dining Philosophers problem to a larger group of philosophers. The problem requires finding a solution that allows all the philosophers to eat without deadlock or starvation, even as the number of philosophers increases.","archived":false,"fork":false,"pushed_at":"2023-03-11T12:47:59.000Z","size":1449,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-31T03:55:55.357Z","etag":null,"topics":["42","42heilbronn","42philosophers","42projects","dining-philosophers","dining-philosophers-problem","multithreading","semaphore"],"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/AzerSD.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":"2023-03-06T16:04:41.000Z","updated_at":"2023-06-19T21:45:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"9fa8a540-a191-456b-9d80-3f5b5d56e161","html_url":"https://github.com/AzerSD/Extended-Dining-Philosophers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AzerSD/Extended-Dining-Philosophers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzerSD%2FExtended-Dining-Philosophers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzerSD%2FExtended-Dining-Philosophers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzerSD%2FExtended-Dining-Philosophers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzerSD%2FExtended-Dining-Philosophers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AzerSD","download_url":"https://codeload.github.com/AzerSD/Extended-Dining-Philosophers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzerSD%2FExtended-Dining-Philosophers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35759166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","42heilbronn","42philosophers","42projects","dining-philosophers","dining-philosophers-problem","multithreading","semaphore"],"created_at":"2025-02-15T19:52:16.025Z","updated_at":"2026-07-22T11:02:17.339Z","avatar_url":"https://github.com/AzerSD.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extended-Dining-Philosophers\nThe 42 Philosophers problem is a synchronization and concurrency challenge that extends the classic Dining Philosophers problem to a larger group of philosophers. The problem requires finding a solution that allows all the philosophers to eat without deadlock or starvation, even as the number of philosophers increases.\n\n## Maybe you can handle 5 philosophers, but can you handle more?!\n\n\u003cdiv style=\"text-align:center;\"\u003e\n\n![image](https://user-images.githubusercontent.com/56733438/223171980-a4f1d2ee-2d39-4e01-ae6e-6e4e0494bc2e.png)\n\n\u003c/div\u003e\n\n## Overview\n```\nHere are the things you need to know if you want to succeed this assignment:\n- One or more philosophers sit at a round table.\nThere is a large bowl of spaghetti in the middle of the table.\n- The philosophers alternatively eat, think, or sleep.\nWhile they are eating, they are not thinking nor sleeping;\nwhile thinking, they are not eating nor sleeping;\nand, of course, while sleeping, they are not eating nor thinking.\n- There are also forks on the table. There are as many forks as philosophers.\n- Because serving and eating spaghetti with only one fork is very inconvenient, a\nphilosopher takes their right and their left forks to eat, one in each hand.\n- When a philosopher has finished eating, they put their forks back on the table and\nstart sleeping. Once awake, they start thinking again. The simulation stops when\na philosopher dies of starvation.\n- Every philosopher needs to eat and should never starve.\n- Philosophers don’t speak with each other.\n- Philosophers don’t know if another philosopher is about to die.\n- No need to say that philosophers should avoid dying!\n```\n## Rules (Mandatory Part):\n\n- Each philosopher should be a thread.\n- There is one fork between each pair of philosophers. Therefore, if there are several\nphilosophers, each philosopher has a fork on their left side and a fork on their right\nside. If there is only one philosopher, there should be only one fork on the table.\n- To prevent philosophers from duplicating forks, you should protect the forks state\nwith a mutex for each of them.\n\n\n\n\n## Rules (Bonus Part):\n\nThe program of the bonus part takes the same arguments as the mandatory program.\nIt has to comply with the requirements of the Global rules chapter.\n- All the forks are put in the middle of the table.\n- They have no states in memory but the number of available forks is represented by\n\u003cb\u003ea semaphore\u003c/b\u003e.\n- Each philosopher should be \u003cb\u003ea process\u003c/b\u003e. But the main process should not be a\nphilosopher.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazersd%2Fextended-dining-philosophers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazersd%2Fextended-dining-philosophers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazersd%2Fextended-dining-philosophers/lists"}