1 / 7

Tutorial 9

Tutorial 9. Page Replacement Algorithms. In the following examples. A frame with a value of 0 is empty. A frame shown with an “=” sign holds the same value as it held in the previous time period. First in first out (FIFO). T he reference string of pages is 123472512645

Télécharger la présentation

Tutorial 9

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tutorial 9 Page Replacement Algorithms

  2. In the following examples • A frame with a value of 0 is empty. A frame shown with an “=” sign holds the same value as it held in the previous time period

  3. First in first out (FIFO) • The reference string of pages is 123472512645 • When a page must be replaced, the oldest page is chosen • page faults: 11

  4. Optimal • The reference string of pages is 123472512645 • Replace the page that will not be used for the longest period of time • page faults: 7

  5. Least recently used (LRU) • The reference string of pages is 123472512645 • When a page must be replaced , LRU choses the page that has not been used for the largest period of time • page faults: 10

  6. Second chance When a page is used its use bit is set to 1. We also use a pointer to the next victim which is initialized to the first page/frame. When a page is loaded, it is set to point to the next frame. The list of pages is considered as a circular queue. When a page is considered for replacement, its use bit is examined. If it is zero [that page is replaced] otherwise [the use bit is set to zero, the next victim pointer is advanced, and the process repeated until a page is found with a zero use bit].

  7. Second chance • 9 page faults.

More Related