Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Transcript of XP scheduling
* Windows 3.1x used a non-preemptive scheduler, meaning that it did not interrupt programs.
* It relied on the program to end or tell the OS that it didn't need the processor so that it could move on to another process.
* This is usually called cooperative multitasking.
* Windows 95 introduced a rudimentary preemptive scheduler; however, for legacy support opted to let 16 bit applications run without preemption. Windows Scheduling * Windows XP uses a quantum-based, preemptive priority scheduling algorithm
* Threads are scheduled rather than processes.
* Since the preemptive priority algorithm is implemented with multiple queues, it can also be considered a multiple feedback-queue algorithm. However, each class of thread is normally restricted to a small band of 5 priority levels, from 2 below the base priority for its process to 2 above. Each band of priorities overlaps with the band above it and the band below it.
* Preemption can occur for any of 4 reasons:
higher-priority thread becomes ready
time quantum exhausted
thread performs a blocking system call, such as for I/O, in which case it leaves the READY state and enters a WAITING state.
* There is a queue for each priority
* The dispatcher traverses the set of queues from highest to lowest until it finds a thread that is ready to run
* If there are no processes ready to run the dispatcher executes the idle thread
* Priorities are divided into two classes:
* Variable class: priorities 1 to 15
* Real-time class: priorities 16 to 31 Priority * The scheduler is called a dispatcher
* 32-level priority scheme
* The process scheduling algorithms used by an operating system reflect its primary performance objectives. Windows XP – Real Time Processing and User-Perceived Performance
All processes receive a priority boost after a wait event, but processes that have experienced a keyboard I/O wait get a larger boost than those that have experienced a disk I/O wait.
“Foreground” processes given higher priority.
Xp process Scheduling
Processes are given a priority class upon creation:
Priorities in all classes except the REALTIME_PRIORITY class can change
A thread within a given priority class has a relative priority within the class:
* Each thread has a base priority representing a value in the priority range for the class that the thread belongs
* The priority of each thread is based on both the priority class it belongs to and its relative priority within that class
* As with Solaris the classes and the priorities in the classes are mapped to a global priority
Windows XP Priorities * Priority changes for threads in the variable class
* Time quantum expires: Priority is lowered but not below the base priority
* Thread switches from blocked to running: Priority is increased
* The amount depends on what the thread was doing
* Keyboard I/O gets a large increase while disk I/O gets a moderate increase
* Windows XP distinguishes between the foreground process that is currently selected on the screen and the background processes that are not currently selected
* The strategy tends to give good response times to interactive threads that are using the mouse and windows
* The I/O devices are kept busy