{"id":15780886,"url":"https://github.com/ghulamghousdev/cpu-scheduling-algorithms","last_synced_at":"2025-07-30T14:41:46.007Z","repository":{"id":124979496,"uuid":"264141343","full_name":"ghulamghousdev/CPU-Scheduling-Algorithms","owner":"ghulamghousdev","description":"💾Implemented various CPU scheduling algorithms in C++ with arrival time (Operating Systems)","archived":false,"fork":false,"pushed_at":"2020-08-10T21:24:40.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-11T19:18:31.445Z","etag":null,"topics":["cpu","cpu-scheduling","cpu-scheduling-algorithms","cpu-scheduling-programs"],"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/ghulamghousdev.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":"2020-05-15T08:37:44.000Z","updated_at":"2020-08-10T21:24:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0f2cc4f-e411-44be-80b9-456fd69e1f91","html_url":"https://github.com/ghulamghousdev/CPU-Scheduling-Algorithms","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/ghulamghousdev%2FCPU-Scheduling-Algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghulamghousdev%2FCPU-Scheduling-Algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghulamghousdev%2FCPU-Scheduling-Algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghulamghousdev%2FCPU-Scheduling-Algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghulamghousdev","download_url":"https://codeload.github.com/ghulamghousdev/CPU-Scheduling-Algorithms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246498663,"owners_count":20787357,"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":["cpu","cpu-scheduling","cpu-scheduling-algorithms","cpu-scheduling-programs"],"created_at":"2024-10-04T19:00:36.978Z","updated_at":"2025-03-31T16:35:45.404Z","avatar_url":"https://github.com/ghulamghousdev.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CPU Scheduling Algorithms\n\n\u003cimg src=\"https://img.shields.io/badge/Operating Systems-CPU Scheduling Algorithm-\u003cgreen\u003e\"\u003e \u003cimg src=\"https://img.shields.io/static/v1?label=Language\u0026message=CPP\u0026color=blue\"\u003e\n\u003cbr\u003e\n\n\n\u003cbr\u003e\n\n## Implemented Algorithm \u003cbr\u003e\n\nImplemented following CPU scheduling algorithms in C++ with same and different arrival time \u003cbr\u003e\n\u003cbr\u003e\n- First Come First Served \u003cbr\u003e\n- Shortest Job First \u003cbr\u003e\n- Round Robin \u003cbr\u003e\n- Priority Scheduling \u003cbr\u003e\n- Best Fit \u003cbr\u003e\n- First Fit \u003cbr\u003e\n- Bankers Algorithm \u003cbr\u003e\n\n\u003cbr\u003e\n\n## Features\nSome of the features included are, \u003cbr\u003e\n- Concept of Arrival Time \u003cbr\u003e\n- Representation of individual process data like, Turn Around Time, Waiting Time etc. \u003cbr\u003e\n- Calculation of Average Turn Around Time and Waiting Time \u003cbr\u003e\n\u003cbr\u003e\n\n## First Come First Served \u003cbr\u003e\n\nAs the name suggests, the process which arrives first, will be served first.This scheduling algorithm is \u003cb\u003e non- preemptive \u003c/b\u003e. \nHere, processes are sorted by their respective arrival time and then are executed. The process with lowest arrival time will \nget priority in execution.\u003cbr\u003e\n\u003cbr\u003e\n\n## Shortest Job First \u003cbr\u003e\n\nProcesses have their respective burst time, which suggests how much CPU time a process requires in order to get executed. \nThis scheduling algorithm in \u003cb\u003e Non- Preemptive \u003c/b\u003e. Here, the processes are first sorted with their respective arrival \ntime. As soon the process arrives, it gets enqueued in a queue of arrived processes. The processes are executed in ascending \norder of their burst time in from the queue of arrived process. \u003cbr\u003e\n\u003cbr\u003e\n\n## Round Robin \u003cbr\u003e\n\nHere, the process starvation is least as every process is executed in round robin fashion for a certain specified time quantum.\nOnce a process is executed for the given time quantum, it leaves the CPU and gives turn to next process.\n\u003cbr\u003e\n\n## Priority Schedulig \u003cbr\u003e\nPriority scheduling is a non-preemptive algorithm and one of the most common scheduling algorithms in batch systems. Each process is \nassigned a priority. Process with highest priority is to be executed first and so on. Processes with same priority are executed on \nfirst come first served basis.\n\u003cbr\u003e\n\n## Best Fit \u003cbr\u003e\n\nThe best fit deals with allocating the smallest free partition which meets the requirement of the requesting process. \nThis algorithm first searches the entire list of free partitions and considers the smallest hole that is adequate. It then \ntries to find a hole which is close to actual process size needed.\n\u003cbr\u003e\n## First Fit \u003cbr\u003e\n\nIt is an memory allocation algorithm to different processes. First Fit Algorithm is the simplest technique of allocating the\nmemory block to the processes amongst all. In this algorithm, the pointer keeps track of all the free blocks in the memory \nand accepts the request of allocating a memory block to the coming process\n\u003cbr\u003e\n\n## Bankers Algorithm\n\nThe banker’s algorithm is a resource allocation and deadlock avoidance algorithm that tests for safety by simulating \nthe allocation for predetermined maximum possible amounts of all resources, then makes an “s-state” check to test for \npossible activities, before deciding whether allocation should be allowed to continue.\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghulamghousdev%2Fcpu-scheduling-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghulamghousdev%2Fcpu-scheduling-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghulamghousdev%2Fcpu-scheduling-algorithms/lists"}