Presentation is loading. Please wait.

Presentation is loading. Please wait.

Virtual Memory By CS147 Maheshpriya Venkata. Agenda Review Cache Memory Virtual Memory Paging Segmentation Configuration Of Virtual Memory Cache Memory.

Similar presentations


Presentation on theme: "Virtual Memory By CS147 Maheshpriya Venkata. Agenda Review Cache Memory Virtual Memory Paging Segmentation Configuration Of Virtual Memory Cache Memory."— Presentation transcript:

1 Virtual Memory By CS147 Maheshpriya Venkata

2 Agenda Review Cache Memory Virtual Memory Paging Segmentation Configuration Of Virtual Memory Cache Memory Vs Virtual Memory

3 Review Cache Memory Cache Memory is constructed using static RAM chips. It is used to minimize processor’s memory access time In the memory hierarchy, cache memory is located closet to the microprocessor

4 Three Types Of Cache Mapping Direct Mapping Associative Mapping Set Associative Mapping

5 Cache Performance The primary components of cache performance are Cache Hits and Cache Misses. The Hit Ratio is percentage of memory access from the cache. If the greater the hit ratio, the better the system performance.

6 Agenda Review Cache Memory Virtual Memory Paging Segmentation Configuration Of Virtual Memory Cache Memory Vs Virtual Memory

7 Virtual Memory What is Virtual Memory? –Virtual Memory swaps the data in and out of physical memory. –It uses storage devices such as disk to expand available memory space. –Virtual memory makes CPU appears that there is more physical memory than is actually present.

8 Virtual Memory Contd –The goal of the virtual memory is to provide efficient use of memory space among users and to achieve high access rate. –Memory Management Unit (MMU) moves data between physical memory and slower storage devices such as disk. –The storage area is called Swap Disk or Swap File.

9 CPU MMU Physical Memory Swap disk Physical address Logical address MMU Configuration within Memory Hierarchy

10 Two Methods for Implementing Virtual Memory Paging Segmentation

11 Paging In paging, the entire range of logical addresses is divided into contiguous blocks called pages. Each pages is the same size and each logical address is resides in exactly one page. Physical memory is divided into non-overlapping frames The size of each frame is the same as the size of one page

12 Paging Contd Page Fault - If the data is not located in physical memory,it generate a page fault and moves the page from the swap disk to a frame. - removes another page if necessary.

13 Memory Configuration of simple CPU Frame3 Frame 2 Frame 1 Frame 0 Physical memory Address space.. Page F Page 2 Page 1 Page 0

14 Segmentation Segmentation is another method of allocating memory A program is divided into several segments, each of which is a self-contained unit, such as a subroutine or data structure. Segments can vary in size. MMU manages segmented memory differently than page memory.

15 Segmentation Contd Segmentation has advantage and disadvantage. In the paged memory, each page is of size 4k. A program of size 4k + 1 would require the MMU to allocate two pages of memory, even though the second page would use one of its 4K locations.- Internal Fragmentation.

16 There are three segments resident in memory and 8K of free space. However, the free spaces is partitioned such that no segment greater than 3K can be loaded into memory with out moving or removing one of the currently loaded segments. Unused H a ri h a r a n V e n k a t a : unused segment unused segment 16k-1 13k 13k-1 9k 9k-1 6k 6k-1 5k.... External Fragmentation

17 Configuration Of Virtual Memory In windows 2000 Go to Start —> Settings—> Control Panel Click on “Systems”. A window will be displayed similar to one in next slide. Then Go to Advanced —>Click on “performance options”

18

19

20

21 Cache Memory Vs Virtual Memory –A cache memory works by moving data to and from physical memory. –When the CPU request data that is stored in cache, it receives this data faster than if it had to retrieve the data from physical memory Virtual memory swap data in and out of physical memory Virtual memory places open applications that are not active and portions of active applications on your hard drive and only keeps what is necessary for functionality in real RAM.

22 Conclusion Any Questions?


Download ppt "Virtual Memory By CS147 Maheshpriya Venkata. Agenda Review Cache Memory Virtual Memory Paging Segmentation Configuration Of Virtual Memory Cache Memory."

Similar presentations


Ads by Google