Schedulingis the technique used to enhance the performance of the CPU. To increase theCPU utilization and reduced the average waiting time, average turnaround timeand average response time.CPU scheduling algorithm worked on maximizethroughput. I used two CPU scheduling algorithms and combined them in one thatis SJF and round robin. Both can combine and generate new technique thatbehaves well effective. In this Technique, the processor is in ready queue inaccording to CPU burst length, Shortest burst length is at the top of thequeue. We tend to assume two numbers to represent the burst length of thelargest PCB within the queue and the second one to represent the running timeof all the processes respectively.
A Process control block (PCB) of a process isoften submitted to the system which is connected to the ready queue inaccording to the CPU.Theproposed algorithm that is executed by the CPU linked to the process from thetop of the queue. Executed Process is expired after a given time quantum, whichis defined by the system. After that, new preemption is as follow:te= te + quantum time Timequantum applies to boost the efficiency and minimize the average waiting timeaverage turnaround time and average waiting and context switching between theprocesses. Inthat case, five states are in the process which is new, ready, running, blockand complete state. The new state admitted the process and dispatch to theready state.
The ready queue then moves forwards the process to the runningstate. If an interrupt occur on ready state then it will back to the readystate if the processor requires an I/O device then it moves to the block stateand if the process completed then it moves to the complete state. Block Statecomplete the requirement for the processor such that I/O and then moved to theready queue. Comparison of two numbers is as fellow: Ifexecution time of a process te is less than the largest burst length of the PCBto then the preempted process PCB is joined to the tail of the ready queue.After that, the next process is then dispatched from the top of the readyqueue.
If te ? to Thenthe Process control block (PCB) of the process with the largest CPU burstlength is to start the execution. InPreemption, SJF is in the ready queue that’s why shortest job entertainedfirst. The value of te is reset to 0 and the value of the CPU burst length ofthe largest PCB is reset that is lying at the tail of the queue. After that,the next process is then moving towards from the head of the ready queue.Whena process has accomplished its task it terminates and deleted from the system.Then te will be:te= te + time to complete processProcessand actions are same as a preempted process.