Columbia COMS W4118 - Interactive Scheduling (13 pages)

Previewing pages 1, 2, 3, 4 of 13 page document View the full content.
View Full Document

Interactive Scheduling



Previewing pages 1, 2, 3, 4 of actual document.

View the full content.
View Full Document
View Full Document

Interactive Scheduling

27 views


Pages:
13
School:
Columbia University
Course:
Coms W4118 - Operating Systems I

Unformatted text preview:

1 39 Interactive Scheduling Round Robin Take turns Give each process a time quantum When the time is up move the current process to the end of the queue 1 39 Quantum Length The shorter the quantum the more responsive the system However process switching is expensive saving and reloading registers switching virtual memory maps flushing the cache bookkeeping etc Suppose the compute quantum is 4 msec and process switches take 1 msec That s 20 overhead too much Suppose we have 100 msec quanta If the run queue ever gets long even cheap requests will take too long Need a reasonable compromise 20 50 msec 2 39 1 Priority Scheduling Not all processes are equally important Assign them priority levels Simplest version always run the highest priority process Not a good idea what if it s CPU bound 3 39 Priority Adjustments Periodically reduce the priority of the running process Eventually it falls below the priority of the next process Alternative increase the priority of non running processes Called process aging Or do both 4 39 2 Dynamic Priority Adjustment Adjust process priority according to its recent history Example increase priority of non running processes decrease priority of running processes as above Boost priority of I O bound processes If process used 1 f of its last quantum boost its priority proportional to f Use priority classes have separate queues for each priority level and run each queue round robin switch to lower priority queue when this one is empty 5 39 Run Queues Each run queue is a linked list To raise or lower a process priority move it to a different list Two schemes for priority aging Not many processes have a fine grained counter for each process incremented at a clock interrupt at some limit increase priority Lots of processes and queues periodically move each list to the next level up 6 39 3 Varying Quanta Many processes need just a little bit of CPU time Since process switches can be expensive don t do them too often Solution to both problems



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Interactive Scheduling and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Interactive Scheduling and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?