Presentation is loading. Please wait.

Presentation is loading. Please wait.

Memory Management & Virtual Memory

Similar presentations


Presentation on theme: "Memory Management & Virtual Memory"— Presentation transcript:

1 Memory Management & Virtual Memory
Operating Systems Memory Management & Virtual Memory 1) These notes are © Aiman Hanna. All copyrights reserved. For more information please to: 2) These notes are also based on: Operating Systems, 3rd edition by Garry Nutts, published by Addison Wesley, ISBN-10: | ISBN-13: These notes still totally enforce all copyrights for Nutts/ Addison Wesley. For more information on these rights, please refer to the original publication of the book. 3) VERY IMPORTANT: These notes are neither complete nor sufficient to study for the course. They are merely given so that you can follow the covered subjects. You should NEVER depend solely on these notes for your study. Any use of these notes that results in violation of any of the copyrights indicated above is strictly prohibited. © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada Data Communications & Computer Networking, by: Aiman Hanna

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

3 Dynamic Address Space Binding
Also referred to as dynamic address relocation 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)

4 Bound Checking 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

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

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

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

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

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

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

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

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

13 Where is this week coverage in the textbook?
Chapter 11: Figure (page 435) and its discussion Section 11.5 with the following exceptions: Skip: Using Cache Memory & Shared Memory Multiprocessors (page 446 to page 450)

14 Where is this week coverage in the textbook?
Chapter 12: Section 12.1 to 12.6 with the following exceptions: Skip: Implementing LRU (page 480) Windows NT/2000/XP Virtual Memory (page 489 to 493) Linux Virtual Memory (page 493 to 495) Also Skip section 12.7 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"

Similar presentations


Ads by Google