![]() It is impractical since it is not possible to know the burst time of every process in the ready queue in advance.May cause high waiting and response times for CPU-bound processes. ![]() The reason we schedule the processes which take less time first. The minimum average waiting time among all scheduling algorithms.*Waiting time = Turn around time – Burst time * Turn around time = Completion time – Arrival time This runs till completion followed by P2. Then P3 is scheduled whose burst time is 5. Its burst time is 2 more than the remaining time of P2 so P2 is continued to be scheduled until completion. The same comparison is done Since P1 has 3 remaining unit times which is less than P2, it is continued to be scheduled. So when the new process arrives, the remaining burst time of the running process is compared with the burst time of the newly arrived process and if the remaining time of P0 is more than P0 is preempted and P1 is scheduled. At time 1 there is one more process that arrived. It is a preemptive version of SJF(Shortest Job First) scheduling. In the shortest remaining time first scheduling, whenever the new job arrives we compare its burst time with the remaining time of the currently running job and if it is less, then we preempt the currently running job and schedule the newly arrived process. This article talks about SRTF scheduling in detail. In the shortest remaining time first scheduling, jobs are scheduled according to the shortest remaining time.
0 Comments
Leave a Reply. |