Shortest Job first algorithm

prashantgolu

Solid State Member
Messages
15
why is this algorithm better for long term scheduling or job scheduling and not for short term scheduling...?
 

berry120

Fully Optimized
Messages
3,434
Location
UK
The reason that springs to mind is that the shortest job first algorithm requires an estimate of how long a particular process takes to complete. This is often an expensive process to work out, and thus you can't have this thing sitting on your short term scheduler where it'll be executed after every time slice! Long term schedulers are executed much more infrequently and so can make this decision much more sensibly.

It's worth pointing out however that this algorithm isn't really used in practice at all, it causes starvation problems and there's better ones available.
 
Top