Page 1 of 1
Burst Time
Posted: Tue Oct 22, 2013 3:26 pm
by jzhang172
Shortest job First algorithm - It does the shortest job first. In my textbook, there was an example:
Process Burst Time
P1 6
P2 4
P3 10
So obviously, P2 would go first, then P1, followed by P3, then it occurred to me, what if 2 proccesses had the same burst time? What would happen then?
Re: Burst Time
Posted: Tue Oct 22, 2013 3:47 pm
by bwat
Depends, obvoiusly! What's your utility/cost function? That is to say what function of the schedule are you trying to minimise/maximise? e.g., lateness, earliness, tardiness, absolute deviation, squared deviation, unit penalty, average response time, finishing time of the last job, etc. Once you know that you can demonstrate what difference different schedules would make, that is what difference it would make the order in which you chose jobs with the same execution time (or burst as you call it).
I don't have any scheduling books at hand but if my memory hasn't failed me, shortest job first is to minimise average waiting times, that is how long a job has to wait on average before it starts execution. Now, if that is true, can you not show that it doesn't make any difference to the average waiting times in which order you schedule two jobs with identical execution times. You can do this with a simple mathematical argument.