1 / 7

Memory Management Strategies Exercise Solutions

Explore solutions for memory management exercises involving swapping systems and page frame allocation scenarios. Includes virtual address computation, policy selection, and page fault calculations.

violete
Download Presentation

Memory Management Strategies Exercise Solutions

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. CSCI 6307 Foundation of Systems – Exercise (4) Xiang Lian The University of Texas – Pan American Edinburg, TX 78539 lianx@utpa.edu

  2. Exercise • Consider a swapping system in which memory consists of the following hole sizes in memory order: 600, 500, 1000, 503, 400, 1050, and 1600 bytes. Which block will be selected for successive requests of: • 500, 503, 100, 1003 using first-fit, best-fit, worst-fit, or next-fit policy.

  3. Exercise • Consider decimal virtual addresses • 10000 • 23406 • 40000 • Compute the virtual page numbers and offsets with page size 4KB

  4. Exercise • Suppose R= 3, 2, 4, 3, 4, 2, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 5, 6, 7, 2, 1 is a page reference stream. Given a page frame allocation of 3, and assuming the primary memory is initially unloaded, how many page faults will the given reference stream incur under: • FIFO • Belady’s optimal algorithm • LRU

  5. FIFO 3 2 4 3 4 2 2 3 4 5 6 7 7 6 5 4 5 6 7 2 1 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 4 4 4 4 4 4 4

  6. Belady’s Algorithm 3 2 4 3 4 2 2 3 4 5 6 7 7 6 5 4 5 6 7 2 1 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 4 4 4 4 4 4 4

  7. LRU 3 2 4 3 4 2 2 3 4 5 6 7 7 6 5 4 5 6 7 2 1 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 4 4 4 4 4 4 4

More Related