Presentation is loading. Please wait.

Presentation is loading. Please wait.

Virtual Memory (Section 9.3). The Need For Virtual Memory Many computers don’t have enough memory in RAM to accommodate all the programs a user wants.

Similar presentations


Presentation on theme: "Virtual Memory (Section 9.3). The Need For Virtual Memory Many computers don’t have enough memory in RAM to accommodate all the programs a user wants."— Presentation transcript:

1 Virtual Memory (Section 9.3)

2 The Need For Virtual Memory Many computers don’t have enough memory in RAM to accommodate all the programs a user wants to run. By using virtual memory, the computer appears to have more memory than it actually does.

3 Overview of Virtual Memory Swap disk: All possible addresses are divided into blocks (pages, segments or a combination of both) Data is swapped between the swap disk and the physical RAM

4 Paging Addresses are divided evenly into blocks called “pages.” Physical memory is divided into “frames” which are the same size as the pages. The entire page is replaced by a frame.

5 Advantages/ Disadvantages of Paging All memory blocks are the same size as each other and blocks from physical storage. Amount of memory allocated may be too large/ small for what is needed.

6 Segmentation Blocks in the swap disk may vary in size. Some systems require the segments to start at certain addresses, others allow any start addresses.

7 Advantages/ Disadvantages of Segmentation More flexible with regards to size. “External fragmentation:” When segments are stored, there are gaps between them. New segments must fit in these gaps.

8 The Memory Management Unit Moves data between the swap disk and physical memory Uses a page table or segment table to keep track of where blocks of memory are stored.

9 Page Table Keeps track of what frame is stored in what page. When table is full, it replaces one process with another, similar to cache memory.

10 Segment table Similar to a page table, but must also keep track of the segment start address (segment number + offset) and segment length.

11 Combining Paging and Segmentation Pages are combined into segments. Stored as segment + page + offset, outputs the frame number Size of segment no longer stored.

12 Memory Protection Different processes all using the same memory. Protection bit is stored with each entry in the page table or segment table, denotes which process is allowed to access that block of memory.

13 The User’s Perspective Doesn’t need to get more RAM for computer. Doesn’t need to understand how it works.


Download ppt "Virtual Memory (Section 9.3). The Need For Virtual Memory Many computers don’t have enough memory in RAM to accommodate all the programs a user wants."

Similar presentations


Ads by Google