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.

Page-replacement policies 103100009000800070006000page faults5000400030002000knee100000 10 20 30 40 50 60 70 80number of page framesFigure 3.19 A typical fault-rate graphWhen physical store only has one page frame, the fault rate is very high. Whenphysical store has 100 page frames, the fault rate is very low. This graph omits faultsthat occur before all the page frames have been filled. That is, it ignores the first f faultswhen there are f page frames. When we ignore those initial faults, we are measuring thewarm-start behavior of the replacement policy instead of the cold-start behavior. Acold-start curve would not trail off to 0 but rather to the number of pages actually referenced(in this case, 71).The point where the curve reaches a fairly low plateau, known as the ‘‘knee’’ ofthe curve, indicates the number of pages that are needed for good behavior.The fault-rate graph summarizes the entire life of the program. The program mighthave several phases. If we were to draw the graph for each phase, we might find thatsome phases have a smaller page requirement and others have a larger one.The fault-rate graph can itself be summarized by the area under the curve, that is,the total number of warm-start page faults for all main-store sizes. We will call this areathe characteristic number of the method when applied to a particular page-referencestring. The characteristic number is not a perfect measure of the value of a pagereplacementpolicy. In practice, one also needs to evaluate the amount of computationnecessary to achieve each method and the sophistication of the hardware needed to supportit.7.1 Random replacement

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

Saved successfully!

Ooh no, something went wrong!