It is a preemptive version of SJF algorithm where the remaining processing time is considered for assigning CPU to the next process.
Now we add the concepts of varying arrival times and preemption to the analysis
|Process||Arrival Time||Burst Time|
Preemptive SJF Gantt Chart
Average waiting time
= [(10-1) +(1-1) +(17-2) +5-3)]/4
= 6.5 milliseconds