{"id":17629861,"url":"https://github.com/adelrizq/sqrt_os","last_synced_at":"2025-05-05T19:56:19.893Z","repository":{"id":67294010,"uuid":"325549995","full_name":"AdelRizq/Sqrt_OS","owner":"AdelRizq","description":"Sqrt OS is a simulation of an OS scheduler and memory manager using different scheduling algorithms including Highest Priority First (non-preemptive), Shortest Remaining Time Next, and Round Robin","archived":false,"fork":false,"pushed_at":"2021-01-17T13:05:09.000Z","size":1301,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-30T23:12:46.417Z","etag":null,"topics":["highest-priority-first","memory-manager","operating-systems","os","round-robin","schedular","shortest-remaining-time-first","sqrt-os","synchronization","synchronizer"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdelRizq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-12-30T12:51:34.000Z","updated_at":"2022-09-07T16:43:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a9cae24-a72e-4fee-937d-6de1d211c7fb","html_url":"https://github.com/AdelRizq/Sqrt_OS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdelRizq%2FSqrt_OS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdelRizq%2FSqrt_OS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdelRizq%2FSqrt_OS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdelRizq%2FSqrt_OS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdelRizq","download_url":"https://codeload.github.com/AdelRizq/Sqrt_OS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252568685,"owners_count":21769507,"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":["highest-priority-first","memory-manager","operating-systems","os","round-robin","schedular","shortest-remaining-time-first","sqrt-os","synchronization","synchronizer"],"created_at":"2024-10-23T00:49:01.228Z","updated_at":"2025-05-05T19:56:19.857Z","avatar_url":"https://github.com/AdelRizq.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\r\n\u003ca href=\"https://github.com/AdelRizq/mini-OS\" rel=\"noopener\"\u003e\r\n  \r\n  ![Component 14](https://user-images.githubusercontent.com/40190772/104843823-48f18c00-58d5-11eb-946f-510a76db56b3.png)\r\n\r\n\u003c/div\u003e\r\n\r\n\u003ch3 align=\"center\"\u003eOS ^ 1/2\u003c/h3\u003e\r\n\r\n\u003cdiv align=\"center\"\u003e\r\n  \r\n  [![GitHub contributors](https://img.shields.io/github/contributors/AdelRizq/mini-OS)](https://github.com/AdelRizq/mini-OS/contributors)\r\n  [![GitHub issues](https://img.shields.io/github/issues/AdelRizq/mini-OS)](https://github.com/AdelRizq/mini-OS/issues)\r\n  [![GitHub forks](https://img.shields.io/github/forks/AdelRizq/mini-OS)](https://github.com/AdelRizq/mini-OS/network)\r\n  [![GitHub stars](https://img.shields.io/github/stars/AdelRizq/mini-OS)](https://github.com/AdelRizq/mini-OS/stargazers)\r\n  [![GitHub license](https://img.shields.io/github/license/AdelRizq/mini-OS)](https://github.com/AdelRizq/mini-OS/blob/master/LICENSE)\r\n  \u003cimg src=\"https://img.shields.io/github/languages/count/AdelRizq/mini-OS\" /\u003e\r\n  \u003cimg src=\"https://img.shields.io/github/languages/top/AdelRizq/mini-OS\" /\u003e\r\n  \u003cimg src=\"https://img.shields.io/github/languages/code-size/AdelRizq/mini-OS\" /\u003e\r\n  \u003cimg src=\"https://img.shields.io/github/issues-pr-raw/AdelRizq/mini-OS\" /\u003e\r\n\r\n\u003c/div\u003e\r\n\r\n## About\r\n\u003e A CPU scheduler determines an order for the execution of its scheduled processes; it\r\n\u003e decides which process will run according to a certain data structure that keeps track\r\n\u003e of the processes in the system and their status.\r\n\r\n\u003e A process, upon creation, has one of the three states: Running, Ready, Blocked (doing\r\n\u003e I/O, using other resources than CPU or waiting on unavailable resource).\r\n\r\n## System Description\r\n\r\n\u003e Consider a Computer with 1-CPU and fixed size memory (1024 ==\u003e can be changed).\r\n\u003e Our scheduler implemented the complementary components as sketched in the following diagrams.\r\n\r\n📌 NOTE:\r\n\r\n\u003e We are supporting the following Scheduling algorithms:\r\n\r\n1. HPF (Highest Priority First)\r\n2. STRN (Shortest Time Remaining Next)\r\n3. RR (Round Robin)\r\n\r\n\u003cdiv align='center'\u003e\u003cimg src=\"assets/diagram.png\"\u003e\u003c/div\u003e\r\n\r\n## Used Data structures\r\n\r\n|     Algo/Part     |       DS       |\r\n|:-----------------:|:--------------:|\r\n|   Processes WTA   |  Linked list   |\r\n|    HPF - SRTN     | Priority queue |\r\n| RR - Waiting list |     Queue      |\r\n|       Buddy       |  Binary tree   |\r\n\r\n## Algorithm Flow\r\n\r\n- Algo Explanation:\r\n    1. Recieve and process all processes which come in the current second\r\n      1. In case of free space: Allocate space for it and push it in the ready queue\r\n      2. Else: Push it in the waiting list\r\n\r\n    2. Check the running process if it finishes or not\r\n      1. True: Free its allocated space and check the waiting list\r\n      2. False: Pass (continue the code flow)\r\n    3. Check if the ready queue is not empty:\r\n       - True: based on the algo, we decide that we will switch or not\r\n    4. Wait till the next second\r\n\r\n\r\n## Results\r\n1. HPF Algorithm\r\n\r\n\u003cdiv align='center'\u003e\u003cimg src=\"assets/HPF_result_P1.png\"\u003e\u003c/div\u003e\r\n\u003cdiv align='center'\u003e\u003cimg src=\"assets/HPF_result_P2.png\"\u003e\u003c/div\u003e\r\n  \r\n\u003chr /\u003e\r\n\r\n2. SRTN Algorithm\r\n\r\n\u003cdiv align='center'\u003e\u003cimg src=\"assets/SRTN_result_P1.png\"\u003e\u003c/div\u003e\r\n\u003cdiv align='center'\u003e\u003cimg src=\"assets/SRTN_result_P2.png\"\u003e\u003c/div\u003e\r\n\r\n\u003chr /\u003e\r\n\r\n3. Round Robin Algorithm\r\n\r\n\u003cdiv align='center'\u003e\u003cimg src=\"assets/RR_result_P1.png\"\u003e\u003c/div\u003e\r\n\u003cdiv align='center'\u003e\u003cimg src=\"assets/RR_result_P2.png\"\u003e\u003c/div\u003e\r\n        \r\n### Contributors\r\n\u003ctable\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/AbdallahHemdan\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/40190772?s=460\u0026v=4\" width=\"150px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAbdallah Hemdan\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\r\n     \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/AdelRizq\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/40351413?s=460\u0026v=4\" width=\"150px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAdel Mohamed\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\r\n     \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/ahmedsherif304\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/40776441?s=460\u0026u=9939dbf6811189204bef5360d51cccfc9765d2a7\u0026v=4\" width=\"150px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAhmed Sherif\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\r\n     \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Mahboub99\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/43186742?s=460\u0026v=4\" width=\"150px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAhmed Mahboub\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n \u003c/table\u003e\r\n\r\n### Licence\r\n[MIT Licence](https://github.com/AdelRizq/mini-OS/blob/main/LICENSE)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadelrizq%2Fsqrt_os","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadelrizq%2Fsqrt_os","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadelrizq%2Fsqrt_os/lists"}