{"id":25299994,"url":"https://github.com/mayanksavaliya/cpu-scheduling-algorithms","last_synced_at":"2025-04-06T23:39:24.355Z","repository":{"id":244630359,"uuid":"815803544","full_name":"MayankSavaliya/CPU-Scheduling-Algorithms","owner":"MayankSavaliya","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-16T07:56:40.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T05:36:42.998Z","etag":null,"topics":["cpp","cpp17","cpp20"],"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/MayankSavaliya.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-06-16T07:52:17.000Z","updated_at":"2024-06-16T11:14:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"02c74378-71b7-4d03-9520-b2535bd7a7c8","html_url":"https://github.com/MayankSavaliya/CPU-Scheduling-Algorithms","commit_stats":null,"previous_names":["mayanksavaliya/cpu-scheduling-algorithms"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayankSavaliya%2FCPU-Scheduling-Algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayankSavaliya%2FCPU-Scheduling-Algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayankSavaliya%2FCPU-Scheduling-Algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayankSavaliya%2FCPU-Scheduling-Algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MayankSavaliya","download_url":"https://codeload.github.com/MayankSavaliya/CPU-Scheduling-Algorithms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247569135,"owners_count":20959758,"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":["cpp","cpp17","cpp20"],"created_at":"2025-02-13T05:36:36.451Z","updated_at":"2025-04-06T23:39:24.331Z","avatar_url":"https://github.com/MayankSavaliya.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CPU-Scheduling-Algorithms\n\n\nThis repository contains implementations of various CPU scheduling algorithms in C++. The algorithms implemented are:\n\n- Round Robin (RR)\n- First-Come-First-Serve (FCFS)\n- Shortest-Job-First (SJF)\n- Shortest-Remaining-Time-First (SRTF)\n\n## Introduction\n\nCPU scheduling is a fundamental concept in operating systems where the scheduler decides which of the processes in the ready queue is to be allocated the CPU. The goal of CPU scheduling is to make the system efficient, fast, and fair.\n\n## Implemented Algorithms\n\n### Round Robin (RR)\nRound Robin is a preemptive scheduling algorithm where each process is assigned a fixed time slice or quantum. When a process's time quantum expires, the next process in the ready queue is given the CPU.\n\n### First-Come-First-Serve (FCFS)\nFCFS is the simplest CPU scheduling algorithm that schedules according to the arrival times of various processes. The process that arrives first is scheduled first.\n\n### Shortest-Job-First (SJF)\nSJF is a non-preemptive scheduling algorithm where the process with the shortest burst time is scheduled next. It can reduce the average waiting time for other processes.\n\n### Shortest-Remaining-Time-First (SRTF)\nSRTF is a preemptive version of SJF. In this algorithm, the process with the smallest amount of time remaining until completion is selected to execute next.\n\n## Usage\n\nTo compile and run the program, follow these steps:\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/MayankSavaliya/CPU-Scheduling-Algorithms.git\n    ```\n\n2. Navigate to the project directory:\n    ```sh\n    cd CPU-Scheduling-Algorithms\n    ```\n\n3. Compile the program using a C++ compiler, e.g., `g++`:\n    ```sh\n    g++ -std=c++17 -o scheduling scheduling.cpp\n    ```\n\n4. Run the executable:\n    ```sh\n    ./scheduling\n    ```\n\n5. Follow the prompts to enter the number of processes, their arrival times, and burst times. For Round Robin, you will also need to enter the time quantum.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayanksavaliya%2Fcpu-scheduling-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayanksavaliya%2Fcpu-scheduling-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayanksavaliya%2Fcpu-scheduling-algorithms/lists"}