13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

28 Time Management Chapter 2runreadyshort termreadytransput waitmain-store waitmedium termreadylong termFigure 2.1 Three levels of schedulingdomain of medium-term scheduling, a process may be running (that is, it may haveentered the domain of the short-term scheduler), may be ready to run, or may be waitingfor some resource like transput. The medium-term scheduler is in charge of decidingwhen ready processes should be allowed to enter the domain of the short-term schedulerand when they should leave that domain. This decision is based on an attempt to preventovercommitment of space, as we will see in Chapter 3, as well as a desire to balancecompute-bound processes with transput-bound processes. The long-term scheduler distinguishesbetween ready and running processes.We have already seen the distinction between compute-bound and transput-boundprocesses. From the point of view of the short-term scheduler, a compute-bound processremains in view for a long time, since it does not terminate soon and seldom waits fortransput. For this reason, we will call compute-bound processes long processes.In contrast, a transput-bound process comes and goes very quickly, since it disappearsfrom the view of the short-term scheduler as soon as it waits for transput. A processthat interacts heavily with the user tends to be transput-bound. The user gives it acommand, which it interprets and acts on. Shortly thereafter, the process is ready toreceive the next command. The user, however, is still puzzling over the response to theprevious command. The process spends most of its time waiting for the user to submitthe next command and only a little time computing in response to the command. Texteditor programs usually exhibit this sort of behavior. Other transput-bound processes arenot interactive at all but spend a lot of time bringing data in from devices or sending databack out, performing very little computation in between. Programs written in Coboloften have this flavor. Both kinds of transput-bound process are similar in that smallamounts of computation are sandwiched between longer periods of waiting. For this reason,we will call them short processes.

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

Saved successfully!

Ooh no, something went wrong!