13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

chapter 2TIME MANAGEMENTThe first resource we will discuss is time. Time management is usually called scheduling.The goal of scheduling is to provide good service to all the processes that arecurrently competing for the computing resource, that is, the execution of instructions.We can distinguish several classes of scheduling based on how often decisions must bemade.Long-term scheduling decides which jobs or job steps to start next. In a spoolingsystem, this decision is made when a job finishes and is based on the order in which otherjobs have arrived and on their priorities. In batch multiprogramming, the decision maybe based on the different requirements of the competing jobs and the resources currentlyavailable. Interactive multiprogramming often does not have this level of scheduling atall; it is up to the user to decide which job steps to run. We will not discuss long-termscheduling as such in this book, but Chapter 4 is devoted to some of the resourcecontentionissues that are central to that subject.Medium-term scheduling decides which running processes to block (deny service)temporarily, because resources (such as main store) are overcommitted or because aresource request cannot be satisfied at the moment. Chapter 3 discusses the intricacies ofspace management and describes policies for medium-term scheduling.Short-term scheduling, the subject of this chapter, decides how to share the computeramong all the processes that currently want to compute. Such decisions may bemade frequently (tens of times each second) to try to provide good service to all theprocesses. When the medium- or long-term scheduler readies a process or when a transputevent that the process is waiting for finishes, the process arrives in the domain of theshort-term scheduler. It stays there until it terminates, it waits for transput, or a higherlevelscheduler decides to block it. Processes generally alternate between a computingburst, during which they are in the short-term scheduler, and a transput burst, duringwhich they are in a wait list.Figure 2.1 shows these three levels of scheduling. Within the domain of short-termscheduling, a process may be either running or ready to run. The short-term scheduler isin charge of deciding which ready process should be running at any time. Within the27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!