1 / 10

TUTORIAL 1

TUTORIAL 1. FIFO vs LRU. First-in first-out (FIFO) policy: a page replacement policy that removes from main memory the pages that were brought in first. *KEY = Identify what are FIRST PAGE REQUEST for in and out?.

irisa
Download Presentation

TUTORIAL 1

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 1 FIFO vs LRU

  2. First-in first-out (FIFO) policy: a page replacement policy that removes from main memory the pages that were brought in first. *KEY = Identify what are FIRST PAGE REQUEST for in and out? • Least recently used (LRU) policy: a page-replacement policy that removes from main memory the pages that show the least amount of recent activity. *KEY=Identify what are the LATEST PAGE to standby for out? DEFINITION

  3. Identify how much PAGE FRAMES are available. • Identify how much JOB PAGES. • Identify job to process (PAGE REQUESTED). • Identify PAGE swapped IN to and OUT of memory (from Page Frames) • Marks each interrupt with an asterisk. • Count the number of page interrupts. • Compute the FAILURE rate and the SUCCESS rate. FIFO PROCEDURE

  4. Example form Textbook; Figure 3.8

  5. PAGE FRAMES = 2 • JOB PAGES = 4 (A,B,C,D) • Arrangement PAGE REQUESTED = A, B, A, C, A, B, D, B, A, C, D So, Total number Page Requested are 11. QUESTION : Using the FIFO page removal algorithm, does a page trace analysis indicating page faults with asterisks (*). Then compute the failure and success ratios. Identify Requirement

  6. 1 2 3 4 5 6 7 8 9 10 11 A B A C A B D B A C D * * * * * * * * * A A A C C B B B A A D FIFO1 FIFO1 FIFO1 FIFO1 FIFO1 B B B A A D D D C C FIFO2 FIFO2 FIFO2 FIFO2 Answer/Explanation FIFO

  7. COMPLETED ANSWER

  8. Identify how much PAGE FRAMES are available. • Identify how much JOB PAGES. • Identify job to process (PAGE REQUESTED). • Identify LEAST RECENTLY USED PAGE of memory (standby to out) • Marks each interrupt with an asterisk. • Count the number of page interrupts. • Compute the FAILURE rate and the SUCCESS rate. LRU chooses the page that has not been used for the longest period of time. LRU PROCEDURE

  9. 1 2 3 4 5 6 7 8 9 10 11 A B A C A B D B A C D * * * * * * * * Latest A A A A A A D D A A D Most recent B B C C B B B B C C Answer/Explanation LRU

More Related