L20 - Virtual Memory ECS 154B Computer Architecture II...

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

View Full Document Right Arrow Icon
1 ECS 154B Computer Architecture II Winter 2008 Virtual Memory 7.4 Adapted from slides by Mary Jane Irwin, Penn State 2 Virtual Memory • Use main memory as a “cache” for secondary memory – Provides the ability to easily run programs larger than the size of physical memory by paging portions of the program to disk – Allows efficient and safe memory sharing among programs through protection – Simplifies program loading by providing for code relocation • What makes it work? – again the Principle of Locality – A program is likely to access a relatively small portion of its address space during any period of time • Each program is compiled into its own address space – a “virtual” address space – During run-time each virtual address must be translated to a physical address (an address in main memory) 3 Two Programs Sharing Physical Memory • A program’s address space is divided into pages (all one fixed size) or segments (variable sizes) – The starting location of each page (either in main memory or in secondary memory) is contained in the program’s page table Program 1 virtual address space main memory Program 2 virtual address space 4 Address Translation • A virtual address is translated to a physical address by a
Background image of page 1

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

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

Page1 / 4

L20 - Virtual Memory ECS 154B Computer Architecture II...

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

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