{"id":20465095,"url":"https://github.com/sarahabuirmeileh/cpu-scheduling-algorithms","last_synced_at":"2025-03-05T12:23:19.965Z","repository":{"id":239949647,"uuid":"801022783","full_name":"SarahAbuirmeileh/CPU-Scheduling-Algorithms","owner":"SarahAbuirmeileh","description":"c++ implementation for some of CPU scheduling algorithms with some calculated statistics, Gantt chart drowing and reading the data from files","archived":false,"fork":false,"pushed_at":"2024-05-15T15:27:48.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T01:15:02.299Z","etag":null,"topics":["cplusplus","cpu","cpu-scheduling","fcfs","fcfs-process-scheduling","fcfs-scheduling","os","round-robin","round-robin-scheduler","round-robin-scheduling","roundrobin","sjf","sjf-algorithm","sjf-process-scheduling","sjf-scheduling","srt","srt-scheduling"],"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/SarahAbuirmeileh.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-05-15T12:56:12.000Z","updated_at":"2024-05-15T15:27:51.000Z","dependencies_parsed_at":"2024-05-16T03:51:38.813Z","dependency_job_id":"d75eb742-2ec7-4bb2-b661-1c28d2b848ff","html_url":"https://github.com/SarahAbuirmeileh/CPU-Scheduling-Algorithms","commit_stats":null,"previous_names":["sarahabuirmeileh/cpu-scheduling-algorithms"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SarahAbuirmeileh%2FCPU-Scheduling-Algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SarahAbuirmeileh%2FCPU-Scheduling-Algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SarahAbuirmeileh%2FCPU-Scheduling-Algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SarahAbuirmeileh%2FCPU-Scheduling-Algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SarahAbuirmeileh","download_url":"https://codeload.github.com/SarahAbuirmeileh/CPU-Scheduling-Algorithms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242024684,"owners_count":20059570,"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":["cplusplus","cpu","cpu-scheduling","fcfs","fcfs-process-scheduling","fcfs-scheduling","os","round-robin","round-robin-scheduler","round-robin-scheduling","roundrobin","sjf","sjf-algorithm","sjf-process-scheduling","sjf-scheduling","srt","srt-scheduling"],"created_at":"2024-11-15T13:17:16.398Z","updated_at":"2025-03-05T12:23:19.935Z","avatar_url":"https://github.com/SarahAbuirmeileh.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Process Scheduling Algorithms ⚙️💻\nThis repository contains C++ implementations of various process scheduling algorithms:\n\n* First Come First Serve (FCFS)\n* Shortest Remaining Time First (SRT)\n* Round Robin (RR)\n* Shortest Job First (SJF)\n\n\n## Description 🎯\nEach algorithm is implemented in its respective file. The main program, main.cpp, reads process information from input files, simulates the scheduling algorithms, and prints out the results.\n\n## Files 🗂\n* PCB.h: Defines the Process Control Block (PCB) structure used to represent individual processes.\n* PCBFuns.h: Contains helper functions used in scheduling algorithms.\n* algorithms.cpp: Contains implementations of the scheduling algorithms.\n* main.cpp: The main program that orchestrates the simulation and prints results.\n* processes/: Directory containing input files for different scheduling algorithms.\n\n\n## How to Use 👩🏻‍💻\n1. Compilation: Compile the program using a C++ compiler. For example: \u003cbr\u003e\n```g++ main.cpp -o scheduler```\n\n2. Input Files: Prepare input files in the processes/ directory. Each input file should follow the format specified below: \n    ```php\n    \u003ccontext_switch_time\u003e \u003cquantum_time\u003e \n    \u003cprocess_id\u003e \u003carrival_time\u003e \u003cCPU_burst_time\u003e \u003csize_in_bytes\u003e\n    ```\n3. Execution: Run the compiled program, providing the number of processes as a command-line argument. For example:\n\n4. Output: The program will display Gantt charts and various statistics for each scheduling algorithm.\n\n## Input File Format 📑\nEach input file should contain the following information:\n\n* The first line specifies the context switch time and quantum time.\n* Each subsequent line represents a process, with the following fields separated by spaces:\n    * * Process ID\n    * * Arrival time\n    * * CPU burst time\n    * * Size in bytes\n* Example input file (FCFS.txt):\n\n    ```yaml\n    2 4\n    1 0 8 1024\n    2 1 6 512\n    3 3 10 2048\n    ```\n\n## Output 💻\nThe program generates Gantt charts and calculates the following statistics for each scheduling algorithm:\n\n* Average Waiting Time\n* Average Turnaround Time\n* CPU Utilization Rate","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarahabuirmeileh%2Fcpu-scheduling-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsarahabuirmeileh%2Fcpu-scheduling-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarahabuirmeileh%2Fcpu-scheduling-algorithms/lists"}