This course is run at the The University of Nottingham within the School of Computer Science & IT. The course is run by Graham Kendall (EMAIL : firstname.lastname@example.org)
Consider processes with different CPU burst characteristics. If a process uses too much of the CPU it will be moved to a lower priority queue. This will leave I/O bound and (fast) interactive processes in the higher priority queue(s).
Assume we have three queues (Q0, Q1 and Q2). Q0 is the highest priority queue
and Q2 is the lowest priority queue.
The scheduler first executes process in Q0 and only considers Q1 and Q2 when Q0 is empty. Whilst running processes in Q1, if a new process arrived in Q0, then the currently running process is preempted so that the Q0 process can be serviced.
Any job arriving is put into Q0. When it runs, it does so with a quantum of 8ms (say). If the process does not complete, it is preempted and placed at the end of the Q1 queue. This queue (Q1) has a time quantum of 16ms associated with it. Any processes not finishing in this time are demoted to Q2, with these processes being executed on a FCFS basis.
The above description means that any jobs that require less than 8ms of the CPU are serviced very quickly. Any processes that require between 8ms and 24ms are also serviced fairly quickly. Any jobs that need more than 24ms are executed with any spare CPU capacity once Q0 and Q1 processes have been serviced.
In implementing a multilevel feedback queue there are various parameters that
define the scheduler.
· The number of queues
· The scheduling algorithm for each queue
· The method used to demote processes to lower priority queues
· The method used to promote processes to a higher priority queue (presumably by some form of aging)
· The method used to determine which queue a process will enter
If you are interested in scheduling algorithms then you might like to implement
a multilevel feedback queue scheduling algorithm. Once implemented you can mimic
any of the other scheduling algorithms we have discussed (e.g. by defining only
one queue, with a suitable quantum and the RR algorithm we can generalise to
the RR algorithm).
|Last Page||Back to Main Index||Next Page|
Last Updated : 23/01/2002