CS 320 Unit 17 Virtual Memory

CS 320 Unit 17 Virtual Memory - Unit 17 Virtual Memory CS...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Unit 17 Virtual Memory CS 320 Computer Architecture Spring 2009 Minnesota State University Furman Haddix, Assistant Professor
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unit 17 Virtual Memory Objectives Master the concepts behind virtual memory, including Memory fragmentation (internal and external) Paging Segmentation Address translation Translation Look-aside Buffer Real World Example Pentium 4 Execution Trace Cache Segmentation with Paging. Text, Chapter 6
Background image of page 2
Virtual Memory Main memory can act as a cache for the secondary storage (disk). Advantages: illusion of having more physical memory program relocation protection Just as cache is faster and more expensive than main memory, main memory is faster and more expensive than disk. In olden days, processing often took place between storage devices A merge might read data from two tape drives, and write merge results to a third. Obtaining results might take hours, or days. Virtual addresses Physical addresses Address translation Disk addresses
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Virtual Memory Cache memory enhances performance by providing faster memory access speed. Virtual memory enhances performance by providing greater memory capacity, without the expense of adding main memory. Instead, a portion of a disk drive serves as an extension of main memory. If a system uses paging, virtual memory partitions main memory into individually managed page frames , that are written (or paged) to disk when they are not immediately needed. Before paging, overlays were used when memory needed exceeded memory available. Overlays required dividing the program into smaller units which could be individually loaded when needed.
Background image of page 4
Why Paging? Program Space (Code and Data) Physical Memory does not fit Overlay1 Physical Memory overlays fit sequentially Overlay 2 Overlay 4 Overlay 3 Overlay1 Overlay 2 Overlay 3 Overlay 4 Program Space Physical Memory new pages Pagefile replac e pages Pg 1 Pg 1 Pg 2 Pg 2 Pg 3 Pg 3 Pg 4 Pg 4 Pg 5 Pg 5 Pg 6 Pg 2 Pg 6 Pg 7 Pg 3 Pg 7 Pg 8 Pg 4 Pg 8 Pg 5 SWAP Pg 1 PAGE OUT Pg 6
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Virtual Memory A physical address is the actual memory address of physical memory. Programs create virtual addresses that are mapped to physical addresses by the memory manager. Page faults occur when a logical address requires that a page be brought in from disk. Memory fragmentation occurs when the paging process results in the creation of small, unusable clusters of memory addresses.
Background image of page 6
Virtual Memory Main (or physical) memory and virtual memory are divided into equal sized pages. The entire address space required by a process need not be in memory at once. Some parts can be on disk, while others are in main memory. Further, the pages allocated to a process do not need to be stored contiguously-- either on disk or in memory.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/09/2008 for the course CS 320 taught by Professor Furmanhaddix during the Spring '08 term at Minnesota State University, Mankato.

Page1 / 53

CS 320 Unit 17 Virtual Memory - Unit 17 Virtual Memory CS...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online