【正文】
escape39。CPU and Disk Scheduling Algorithms By: Stefan Peterson Lets Start with Windows ? In the Beginning ? DOS and prior to ? Windows did not multitask and thus had no need for CPU scheduling ? Windows ? Used a nonpreemptive scheduler Non Preemptive Scheduling ? Programs do not get interrupted ? Relies on cooperative multitasking ? The OS relied on the program to tell it when it was finished. Windows 95 and After ? Up until Vista Windows used a multilevel feedback queue. ? 32 levels defined from 0 – 31 ? 0 belonging to Windows ? 1 – 15 are normal priorities ? 16 – 31 are for soft real time priorities ? These require privileges to assign ? User can assign 5 of these priorities to a running application via the task manager application or Thread Management API Multilevel Feedback Queue ? Preferences ? Shortest jobs ? I/O bound processes ? Quickly establish the nature of a process and schedule the process accordingly. ? In the multilevel feedback queue, a process is given just one chance to plete at a given queue level before it is forced down to a lower level queue. ? A process enters the queue and processes are taken out in that same order. ? When a process does not plete instead of going back to the end of the same queue it just goes down one queue. FIFO Queue New process Full Full A new process is positioned at the end of the toplevel FIFO queue. At some stage the process reaches the head of the queue and is assigned the CPU. FIFO in the CPU Process in CPU Is process plete? If the process is pleted it leaves the system. Yes