p2 avg waiting time is wrong it should be9+0+0+2/4
its correct...it is 9 + 1 + 0 + 2 / 4
Process | Arrival Time | Burst Time----------------------------------- P1 | 0.0 | 5 P2 | 3.0 | 5 P3 | 5.0 | 3 P4 | 7.0 | 2Average Waiting Time and Gantt Chart using Shortest Job First (Preemptive)Please Can you tell me how to solve this ?
I have doubt in above solution, that is p3 finished at 5, and arr time of p5 is 5.so shouldn't we start p5 even though it is not shortest but its arr time is 5 instead of starting p2.
same confusion here i think p2 should nt come after p3 p4 should cz its arrival time is 5 nd p3 completes ob 5
its completey wrong ...its sjf means short job should come first so according to that p3,p2,p4,p1 is d correct way
goodboy u are right
its correct, thats preemptive, so we have to check after each new job arrive what is the remaining time, and the one with the shortest remaining time gets the priority.
process name | Arrival time | burst timeA | 0 | 4B | 2 | 7C | 3 | 2D | 3 | 2 plz any one tell the waiting time and turn arround time for each process