{"id":19644529,"url":"https://github.com/shriniwasmahajan/cpu_scheduling_algos","last_synced_at":"2026-06-12T12:31:10.754Z","repository":{"id":260247730,"uuid":"875721949","full_name":"ShriniwasMahajan/cpu_scheduling_algos","owner":"ShriniwasMahajan","description":"A C++ program that simulates various CPU scheduling algorithms and compares their performance metrics.","archived":false,"fork":false,"pushed_at":"2024-10-30T10:27:04.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T23:56:08.535Z","etag":null,"topics":["cpp","operating-systems"],"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/ShriniwasMahajan.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-10-20T17:20:36.000Z","updated_at":"2024-10-30T10:28:07.000Z","dependencies_parsed_at":"2024-10-30T18:29:10.183Z","dependency_job_id":null,"html_url":"https://github.com/ShriniwasMahajan/cpu_scheduling_algos","commit_stats":null,"previous_names":["shriniwasmahajan/cpu_scheduling_algos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ShriniwasMahajan/cpu_scheduling_algos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShriniwasMahajan%2Fcpu_scheduling_algos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShriniwasMahajan%2Fcpu_scheduling_algos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShriniwasMahajan%2Fcpu_scheduling_algos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShriniwasMahajan%2Fcpu_scheduling_algos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShriniwasMahajan","download_url":"https://codeload.github.com/ShriniwasMahajan/cpu_scheduling_algos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShriniwasMahajan%2Fcpu_scheduling_algos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34245217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":["cpp","operating-systems"],"created_at":"2024-11-11T14:28:17.249Z","updated_at":"2026-06-12T12:31:10.734Z","avatar_url":"https://github.com/ShriniwasMahajan.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CPU Scheduler Simulator\n\nA comprehensive C++ program that simulates and analyzes CPU scheduling algorithms used in operating systems. This simulator helps in understanding how different scheduling algorithms perform by comparing their efficiency in process management, resource utilization, and timing metrics. It implements six major scheduling algorithms and provides visual representations along with detailed performance statistics.\n\n## Supported Algorithms\n\n1. First Come First Serve (FCFS)\n2. Shortest Job First (SJF)\n3. Shortest Remaining Time First (SRTF)\n4. Priority Scheduling\n5. Preemptive Priority Scheduling\n6. Round Robin\n\n## Features\n\n- Visual timeline representation of process execution\n- Detailed statistics for each scheduling algorithm:\n  - Waiting time\n  - Turnaround time\n  - Response time\n- Automatic comparison of algorithms to find the best performer\n\n## How to Use\n\n1. Compile the program using a C++ compiler:\n   ```bash\n   g++ main.cpp -o scheduler\n   ```\n\n2. Run the program:\n   ```bash\n   ./scheduler\n   ```\n\n3. Follow the prompts to enter:\n   - Number of processes\n   - For each process:\n     - Process name\n     - Arrival time\n     - Service time\n     - Priority\n   - Time quantum for Round Robin algorithm\n\n## Input Format\n\nEnter process information in the following format:\n```\nProcessName,ArrivalTime,ServiceTime,Priority\n```\n\nExample:\n```\nP1,0,5,2\nP2,1,3,1\nP3,2,4,3\n```\n\n## Output\n\nThe program will display:\n1. Timeline visualization for each algorithm\n2. Statistical metrics for each process\n3. Average metrics for each algorithm\n4. Best performing algorithm for each metric\n\n## Example Output\n\n```\nTimeline:\n  0  1  2  3  4  5\n-------------------\nP1 |* |* |* |. |. |\nP2 |. |* |* |* |. |\nP3 |. |. |. |* |* |\n-------------------\n\nStatistics:\nProcess  Arrival  Service  Finish  Turnaround  Waiting  Response\n----------------------------------------------------------\nP1          0        3        3          3        0         0\nP2          1        3        6          5        2         2\nP3          2        2        8          6        4         4\n----------------------------------------------------------\nAverage                               4.67     2.00      2.00\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshriniwasmahajan%2Fcpu_scheduling_algos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshriniwasmahajan%2Fcpu_scheduling_algos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshriniwasmahajan%2Fcpu_scheduling_algos/lists"}