This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Page 1 Motivations for Virtual Memory Motivations for Virtual Memory Use Physical DRAM as a Cache for the Disk Use Physical DRAM as a Cache for the Disk ¡ Address space of a process can exceed physical memory size ¡ Sum of address spaces of multiple processes can exceed physical memory Simplify Memory Management Simplify Memory Management ¡ Multiple processes resident in main memory. – 1 – z Each process with its own address space ¡ Only “active” code and data is actually in memory z Allocate more memory to process as needed. Provide Protection Provide Protection ¡ One process can’t interfere with another. z because they operate in different address spaces. ¡ User process cannot access privileged information z different sections of address spaces have different permissions. Motivation #1: DRAM a “Cache” for Disk Motivation #1: DRAM a “Cache” for Disk Full address space is quite large: Full address space is quite large: ¡ 32-bit addresses: ~4,000,000,000 (4 billion) bytes ¡ 64-bit addresses: ~16,000,000,000,000,000,000 (16 quintillion) bytes Disk storage is ~300X cheaper than DRAM storage Disk storage is ~300X cheaper than DRAM storage ¡ 80 GB of DRAM: ~ $33,000 – 2 – ¡ 80 GB of disk: ~ $110 To access large amounts of data in a cost To access large amounts of data in a cost-effective manner, effective manner, the bulk of the data must be stored on disk the bulk of the data must be stored on disk 1GB: ~$200 80 GB: ~$110 4 MB: ~$500 Disk DRAM SRAM Levels in Memory Hierarchy Levels in Memory Hierarchy CPU regs regs C a c h e Memory disk 8 B 32 B 4 KB cache virtual memory – 3 – e size: speed: $/Mbyte: line size: 32 B 1 ns 8 B Register Cache Memory Disk Memory 32 KB-4MB 2 ns $125/MB 32 B 1024 MB 30 ns $0.20/MB 4 KB 100 GB 8 ms $0.001/MB larger, slower, cheaper DRAM vs. SRAM as a “Cache” DRAM vs. SRAM as a “Cache” DRAM vs. disk is more extreme than SRAM vs. DRAM DRAM vs. disk is more extreme than SRAM vs. DRAM ¡ Access latencies: z DRAM ~10X slower than SRAM z Disk ~ 100,000X slower than DRAM ¡ Importance of exploiting spatial locality: z First byte is ~ 100,000X slower than successive bytes on disk – 4 – » vs. ~4X improvement for page-mode vs. regular accesses to DRAM ¡ Bottom line: z Design decisions made for DRAM caches driven by enormous cost of misses DRAM SRAM Disk Impact of Properties on Design Impact of Properties on Design If DRAM was to be organized similar to an SRAM cache, how would If DRAM was to be organized similar to an SRAM cache, how would we set the following design parameters? we set the following design parameters? ¡ Line size? z Large, since disk better at transferring large blocks ¡ Associativity?...
View Full Document
- Spring '09
- Virtual memory, main memory, page table