(This is the older material - click here - for current specification content)
8. Scheduling Algorithms (3)
With this approach the idea is to get as many jobs through the CPU as possible. As we have mentioned, many jobs (processes) spend some considerable time waiting for some input-output event, then they run for a bit and once again they have to wait for another input-output event.
This "processing-then-long-waiting-time-between-events" is called the 'burst time'. And this scheduler takes advantage of this behaviour.
It schedules the jobs with the shortest burst time to run first.
For example, consider a word processing job. The user types a key, the word processor then does a short burst of work and then has to wait perhaps a 100 milliseconds (10th of a second) before the person presses another key. A 100 milliseconds is an eternity for a CPU. In that gap between keystrokes the computer could have dealt with 300 million other things to do!
If you consider a CPU can deal with 300 million instructions within this 100 milliseconds, the scheduler will allow this job to run first , because it knows that once that little piece of processing has happened, the word processing job will return to the WAITING queue, thus allowing more demanding jobs to run.
For example you may be also running a music player that wants to send data to the sound system every few microseconds (so as far as you are concerned you are listening to normal music whilst typing a letter.). Once the word processor job is out of the way then it is free to run on the CPU
The shortest burst algorithm is a bit like the Tortoise and the Hare on a race track. In this case the word processor job is the Tortoise and the Music player is the hare whizzing laps around the race track.
The good point about the shortest burst, it does ensure many jobs get processed, but the downside is if every job are of similar burst times then it is not as efficient. For example, there may be a data logger program running that also demands as fast a response as the music. In which case it takes a bit of sense on the part of the owner of the computer not to over-load the machine.
There are many different scheduling algorithms and we have covered three of them here - the Round Robin, the Priority and the Shortest Burst.
Each has its advantages and disadvantages. There is no perfect solution, and it is down to the skills of the operating system designers to make their computer as efficient as possible.
Challenge see if you can find out one extra fact on this topic that we haven't already told you
Click on this link: Shortest Burst Scheduling
Copyright © www.teach-ict.com