Question: Question 02 20 The SJF algorithm may either be preemptive or non-preemptive. The choice arises when a new process arrives at the ready queue while

Question 02 20 The SJF algorithm may either be preemptive or non-preemptive. The choice arises when a new process arrives at the ready queue while a previous process is executing. The new process may have a shorter next CPU burst than what is left of the currently executing process. A preemptive SJF algorithm preempts the currently executing process, whereas a non-preemptive SJF algorithm will allow the currently running process to finish its CPU burst. Preemptive SJF scheduling is sometimes called shortest remaining- time-first scheduling. According to the given scenario how we illustrate the working of the SJF algorithm by using the following system state. Also find the complete time, TAT, WT, RT, Avg TAT, Avg WT for these process. Process PI Arrival Time 0.0 Burst Time 7 P2 2.0 4 P3 4.0 1 P4 5.0 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
