{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Or more virtual addresses 7 carnegie mellon a system

Info iconThis preview shows page 1. Sign up to view the full content.

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:   Linear address space: Ordered set of con2guous non ­nega2ve integer addresses: {0, 1, 2, 3 … } Virtual address space: Set of N = 2n virtual addresses {0, 1, 2, 3, …, N ­1} Physical address space: Set of M = 2m physical addresses {0, 1, 2, 3, …, M ­1} Clean dis;nc;on between data (bytes) and their aVributes (addresses) Each datum can now have mul;ple addresses Every byte in main memory: one physical address, one (or more) virtual addresses 7 Carnegie Mellon A System Using Physical Addressing CPU ... Main memory 0: 1: Physical address 2: 3: (PA) 4: 4 5: 6: 7: 8: M ­1: Data word   Used in some “simple” systems, like embedded microcontrollers in cars, elevators, and digital picture frames 8 Carnegie Mellon A System Using Virtual Addressing CPU Chip CPU Virtual address (VA) 4100 MMU Physical address (PA) 4 ... Main memory 0: 1: 2: 3: 4: 5: 6: 7: 8: M ­1: Data word     Used in all modern servers, desktops, and laptops One of the great ideas in computer science 9 Carnegie Mellon Why Virtual Memory? (1) VM allows efficient use of limited main memory (RAM)   Use RAM as a cache for the parts of a virtual address space some non ­cached parts stored on disk   some (unallocated) non ­cached parts stored nowhere   Keep only ac2ve areas of virtual address space in memory   transfer data back and forth as needed   (2) VM simplifies memory management for programmers   Each process gets a full, private linear address space (3) VM isolates address spaces   One process can’t interfere with another’s memory because they operate in different address spaces   User process cannot access privileged informa2on   different sec2ons of address spaces have different permissions   10 Carnegie Mellon Today           Address spaces (1) VM as a tool for caching (2) VM as a tool for memory management (3) VM as a tool for memory protec;on Address transla;on 11 Carnegie Mellon (1) VM as a Tool for Caching     Virtual memory is an array of N con;guous bytes that may be stored on disk The contents of the array on disk are cached in physical memory (DRAM cache)...
View Full Document

{[ snackBarMessage ]}