CS345 08 - Virtual Memory

CS345 08 - Virtual Memory - CS 345 Virtual Memory Chapter 8...

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 345 Virtual Memory Chapter 8 BYU CS 345 Virtual Memory 2 Topics to Cover… Program Execution Patterns Computer Memory Virtual Memory Paging Segmentation Performance Replacement Algorithms Paging Improvements Objectives BYU CS 345 Virtual Memory 3 Program Execution What are the characteristics of an executing program? Characteristics of an executing program: has code that is unused allocated more memory than is needed has features that are used rarely A program’s instructions must be in main memory to execute, even though… the entire program is not always executing the address space of the program could be broken up across available frames (paging) Program Execution BYU CS 345 Virtual Memory 4 Computer Memory What are the implications of lack of memory? Lack of memory has serious implications What if a program “grows” while executing? What about moving to a new machine? Execution of a program that is not ALL in physical memory would be advantageous. larger address space possible more programs could be in memory less I/O needed to get a process going unused modules would not be loaded Computer Memory BYU CS 345 Virtual Memory 5 Early Memory Solutions What were early solutions to lack of memory? All larger programs had to contain logic for managing two-level storage. The non-volatile hard drive was used to store data and code. Programs were responsible for moving “overlays” back and forth from primary to secondary storage. Multi-programming had to use “base and bounds registers” to manage, allocate, and reallocate memory. Computer Memory BYU CS 345 Virtual Memory 6 Virtual Memory to the Rescue! The first virtual memory machine was developed in 1959. By 1969, IBM’s research team demonstrated that virtual memory controlled systems performed better than manual programmed systems. Virtual memory had its challenges Specialized, hard to build hardware required Too much processor power required to do address translation Computer Memory BYU CS 345 Virtual Memory 7 Virtual Memory What is the difference between “real” and “virtual” memory? Program addresses only logical addresses Hardware maps logical addresses to physical addresses Only part of a process is loaded into memory process may be larger than main memory additional processes allowed in main memory memory loaded/unloaded as the programs execute generally implemented using demand paging. Real Memory – The physical memory occupied by a program (frames) Virtual memory – The larger memory space perceived by the program (pages) Virtual Memory BYU CS 345 Virtual Memory 8 Pages Lines Words Registers Main memory Cache Virtual memory (transferred explicitly via load/store) (transferred automatically upon cache miss) (transferred automatically upon page fault) Cache memory: provides illusion of very high speed...
View Full Document

{[ snackBarMessage ]}

Page1 / 93

CS345 08 - Virtual Memory - CS 345 Virtual Memory Chapter 8...

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

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