Only when
all the foreground processes terminate or are blocked does the system choose a process from among the
background processes to run. To keep things simple and minimize context-switching overheads, the system
might use FCFS to schedule the background tasks.
Multilevel feedback queues
A more complex and dynamic use of multiple queues of different priorities uses experience with the executing
processes to move interactive processes to a higher-priority queue, and batch or CPU-bound processes to
a lower-priority queue. A process which proves to be a heavy user of the CPU gets moved to a background
queue, and a process which blocks often for I/O (and is likely, therefore, to be an interactive process) gets moved
to a foreground queue. Foreground queues will use RR schedulers, and higher-priority foreground queues will
use smaller timeslices. Background queues may be scheduled FCFS and background processes, when finally
scheduled, may enjoy longer intervals of CPU time, so that once the low-priority jobs get the CPU, they can finish.
Any specific implementation of a scheduler is usually based on a combination of scheduling strategies. For
instance, traditional UNIX scheduling used multiple queues.
Pages:
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316