Presentation is loading. Please wait.

Presentation is loading. Please wait.

Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.

Similar presentations


Presentation on theme: "Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada."— Presentation transcript:

1 Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

2 2 Managing Free Memory Blocks Best fit & Worst fit strategies Best fit & Worst fit strategies Comparisons between the two, which one is possibly better? Comparisons between the two, which one is possibly better?

3 3 Dynamic Address Space Binding Also referred to as dynamic address relocation Also referred to as dynamic address relocation CPUs need to include relocation registers CPUs need to include relocation registers If the process is divided/broken into segments, then multiple registers are needed (i.e. code/text register, stack register, data register) If the process is divided/broken into segments, then multiple registers are needed (i.e. code/text register, stack register, data register)

4 4 Bound Checking How the memory manager can provide a service to the security manager How the memory manager can provide a service to the security manager Include a limit register in the CPU and validate all memory access requests against that limit Include a limit register in the CPU and validate all memory access requests against that limit

5 5 Virtual Memory What is it? What is it? Implementing virtual memory using segmentation Implementing virtual memory using segmentation Advantages of segmentation Advantages of segmentation Potential problems and disadvantages of segmentation Potential problems and disadvantages of segmentation

6 6 Virtual Memory through Demand Paging What is paging? What is paging? Advantages of paging Advantages of paging Difference between pages and frames Difference between pages and frames

7 7 Paging – Mapping between Virtual and Physical Addresses Utilization of page tables Utilization of page tables Virtual address translation of paging Virtual address translation of paging Page faults and their overhead Page faults and their overhead Different strategies to reduce page faults Different strategies to reduce page faults What is a paging reference stream? What is a paging reference stream?

8 8 Static Paging Algorithms for Page Replacement Random Replacement Random Replacement Belady Optimal Replacement Belady Optimal Replacement Least Recently Used (LRU) / Most Recently Used (MRU) Least Recently Used (LRU) / Most Recently Used (MRU) Least Frequently Used (LFU) / Most Frequently Used (MFU) Least Frequently Used (LFU) / Most Frequently Used (MFU)

9 9 Static Paging Algorithms for Page Replacement Stack Algorithms Stack Algorithms Why First In First Out (FIFO) is not a good replacement algorithm Why First In First Out (FIFO) is not a good replacement algorithm Belady’s anomaly problem Belady’s anomaly problem

10 10 Attempts to Reduce Page Faults Increase number of frames allocated to the process Increase number of frames allocated to the process Will this always achieve better performance (less page faults)? Why? Will this always achieve better performance (less page faults)? Why? Are there any disadvantages of such approach? Are there any disadvantages of such approach?

11 11 Dynamic Paging Algorithms The Working Set algorithm The Working Set algorithm Advantages/Disadvantages Advantages/Disadvantages Are there any disadvantages of such approach? Are there any disadvantages of such approach?

12 12 Severity of Page Faults Examples were given in class to show how sever page faults can be in terms of degrading system performance Examples were given in class to show how sever page faults can be in terms of degrading system performance What is trashing What is trashing What can be done to reduce page faults? What can be done to reduce page faults? Reserving some memory space to reduce the number of page faults Reserving some memory space to reduce the number of page faults Advantages and disadvantages of this solution Advantages and disadvantages of this solution

13 13 Where is this week coverage in the textbook? Chapter 8: Chapter 8: Sections 8.5 & 8.6 Sections 8.5 & 8.6  Permanently Skip: 8.7 & 8.8 Chapter 9: Chapter 9: Sections 9.1, 9.2, 9.3 & 9.4 Sections 9.1, 9.2, 9.3 & 9.4 Important Notes: Some examples were given in class to show how severe page faults can be on performance. Different solutions & proposals to reduce the number of page faults were also discussed. You must refer to your class notes for these examples and the proposed solutions.  Also notice that MRU & MFU were discusses in class.


Download ppt "Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada."

Similar presentations


Ads by Google