Dated: 01st November 2019
Implemented following CPU scheduling algorithms in C++ with arrival time
- First Come First Served
- Shortest Job First
- Round Robin
- Shortest Job Remaining First
Some of the features included are,
- Concept of Arrival Time
- Random generation of Process data
- Tabular representation of individual process data like, Turn Around Time, Waiting Time etc.
- Calculation of Average Turn Around Time and Waiting Time
As the name suggests, the process which arrives first, will be served first.This scheduling algorithm is non- preemptive . Here, processes are sorted by their respective arrival time and then are executed. The process with lowest arrival time will get priority in execution.
Processes have their respective burst time, which suggests how much CPU time a process requires in order to get executed. This scheduling algorithm in Non- Preemptive . Here, the processes are first sorted with their respective arrival time. As soon the process arrives, it gets enqueued in a queue of arrived processes. The processes are executed in ascending order of their burst time in from the queue of arrived process.
Here, the process starvation is least as every process is executed in round robin fashion for a certain specified time quantum. Once a process is executed for the given time quantum, it leaves the CPU and gives turn to next process. This process is Preemptive .
It is the preemptive implementation of the algorithm Shortest job first. As soon as, a job arrives having lesser burst time than the current executing process, CPU preempts the current executing process and fetchs the one with the least burst time.