Virtual Storage SystemCS510 Computer ArchitecturesLecture 14 - 1 Lecture 14 Virtual Storage System.

Slides:



Advertisements
Similar presentations
1 Overview Assignment 4: hints Memory management Assignment 3: solution.
Advertisements

Virtual Memory 1 Computer Organization II © McQuain Virtual Memory Use main memory as a cache for secondary (disk) storage – Managed jointly.
Virtual Memory In this lecture, slides from lecture 16 from the course Computer Architecture ECE 201 by Professor Mike Schulte are used with permission.
Virtual Memory Really this is in OS – but We need to see how the OS will interact with the HW Peer Instruction Lecture Materials for Computer Architecture.
SE-292 High Performance Computing
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 34 – Virtual Memory II 11/19/2014: Primary Data – A new startup came out of stealth.
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed., Oct. 23, 2002 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
1 Lecture 13: Cache and Virtual Memroy Review Cache optimization approaches, cache miss classification, Adapted from UCB CS252 S01.
Virtual Memory. The Limits of Physical Addressing CPU Memory A0-A31 D0-D31 “Physical addresses” of memory locations Data All programs share one address.
16.317: Microprocessor System Design I
CSIE30300 Computer Architecture Unit 10: Virtual Memory Hsin-Chou Chi [Adapted from material by and
Virtual Memory Hardware Support
CSC 4250 Computer Architectures December 8, 2006 Chapter 5. Memory Hierarchy.
Virtual Memory Adapted from lecture notes of Dr. Patterson and Dr. Kubiatowicz of UC Berkeley.
Chap. 7.4: Virtual Memory. CS61C L35 VM I (2) Garcia © UCB Review: Caches Cache design choices: size of cache: speed v. capacity direct-mapped v. associative.
Virtual Memory Adapted from lecture notes of Dr. Patterson and Dr. Kubiatowicz of UC Berkeley and Rabi Mahapatra & Hank Walker.
S.1 Review: The Memory Hierarchy Increasing distance from the processor in access time L1$ L2$ Main Memory Secondary Memory Processor (Relative) size of.
Recap. The Memory Hierarchy Increasing distance from the processor in access time L1$ L2$ Main Memory Secondary Memory Processor (Relative) size of the.
Technical University of Lodz Department of Microelectronics and Computer Science Elements of high performance microprocessor architecture Virtual memory.
ECE 232 L27.Virtual.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 27 Virtual.
Chapter 3.2 : Virtual Memory
©UCB CS 162 Ch 7: Virtual Memory LECTURE 13 Instructor: L.N. Bhuyan
Virtual Memory BY JEMINI ISLAM. What is Virtual Memory Virtual memory is a memory management system that gives a computer the appearance of having more.
ENGS 116 Lecture 131 Caches and Virtual Memory Vincent H. Berk October 31 st, 2008 Reading for Today: Sections C.1 – C.3 (Jouppi article) Reading for Monday:
©UCB CS 161 Ch 7: Memory Hierarchy LECTURE 24 Instructor: L.N. Bhuyan
CS 241 Section Week #12 (04/22/10).
Operating Systems & Memory Systems: Address Translation Computer Science 220 ECE 252 Professor Alvin R. Lebeck Fall 2008.
Computer Architecture Lecture 28 Fasih ur Rehman.
CSE431 L22 TLBs.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 22. Virtual Memory Hardware Support Mary Jane Irwin (
Lecture 19: Virtual Memory
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
IT253: Computer Organization
Chapter 8 – Main Memory (Pgs ). Overview  Everything to do with memory is complicated by the fact that more than 1 program can be in memory.
Lecture 9: Memory Hierarchy Virtual Memory Kai Bu
Virtual Memory Expanding Memory Multiple Concurrent Processes.
Virtual Memory. Virtual Memory: Topics Why virtual memory? Virtual to physical address translation Page Table Translation Lookaside Buffer (TLB)
2015/11/26\course\cpeg323-08F\Topic7e1 Virtual Memory.
Virtual Memory Additional Slides Slide Source: Topics Address translation Accelerating translation with TLBs class12.ppt.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
1  2004 Morgan Kaufmann Publishers Chapter Seven Memory Hierarchy-3 by Patterson.
CS.305 Computer Architecture Memory: Virtual Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly made available.
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
Digital Computer Architecture Lecture 9-1 Virtual Memory Pradondet Nilagupta Original Note By Prof. Mike Schulte Spring 2001.
3/1/2002CSE Virtual Memory Virtual Memory CPU On-chip cache Off-chip cache DRAM memory Disk memory Note: Some of the material in this lecture are.
CS203 – Advanced Computer Architecture Virtual Memory.
Virtual Memory Slides adapted from Dr. Valeriu Bieu, (Washington State University, EE 334, Spring 2005) (originally adapted from Dr. David Patterson, UC.
CS161 – Design and Architecture of Computer
Memory: Page Table Structure
Virtual Memory Chapter 7.4.
ECE232: Hardware Organization and Design
Memory COMPUTER ARCHITECTURE
CS161 – Design and Architecture of Computer
Lecture 12 Virtual Memory.
Virtual Memory Provides illusion of very large memory
From Address Translation to Demand Paging
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
CMSC 611: Advanced Computer Architecture
Lecture 29: Virtual Memory-Address Translation
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
Virtual Memory Overcoming main memory size limitation
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE451 Virtual Memory Paging Autumn 2002
CSC3050 – Computer Architecture
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Paging and Segmentation
CS703 - Advanced Operating Systems
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Presentation transcript:

Virtual Storage SystemCS510 Computer ArchitecturesLecture Lecture 14 Virtual Storage System

Virtual Storage SystemCS510 Computer ArchitecturesLecture Virtual Storage System Fulfill the main memory capacity needs, not to fill the speed gap between processor and memory Thus, it is a software system Virtual address space >> Physical address space Needs translation of the virtual addresses to the physical addresses –Page Table –Usually entire Page Table can not be loaded in the memory Very slow translation Address translation should be fast - Shouldn’t need more than 1 memory access for the fast translation –TLB made of associative memory –Cache

Virtual Storage SystemCS510 Computer ArchitecturesLecture Virtual Memory Virtual address (2 32, 2 64 ) to Physical Address mapping (2 28 ) Virtual memory terms of cache terms: –Cache block? - page or segment –Cache Miss? - page fault or address fault How is virtual memory different from caches? –What Controls Replacement - HW and SW –Size (transfer unit, mapping mechanisms) –Lower level use - secondary storage ( magnetic disk)

Virtual Storage SystemCS510 Computer ArchitecturesLecture Typical Ranges Of Parameters Block(page) size bytes4KB - 64KB Hit time1-2 clock cycles clock cycles Miss penalty clock cycles700,000-6,000,000 (Access time)(6-60 clock cycles)(500,000- 4,000,000) (Transfer time)(2-40 clcok cycles)(200,000- 2,000,000) Miss rate0.5-10% % Data memory size MB MB ParameterFirst-level cacheVirtual memory

Virtual Storage SystemCS510 Computer ArchitecturesLecture Virtual Storage 4Qs for Virtual Memory? –Q1: Where can a block be placed in the upper level? Fully Associative, Set Associative, Direct Mapped –Q2: How is a block found if it is in the upper level? Tag/Block page table, multi-level page table, inverted page table, translation look-aside buffer (TLB) –Q3: Which block should be replaced on a miss? Random, LRU –Q4: What happens on a write? Write Back or Write Through (with Write Buffer)

Virtual Storage SystemCS510 Computer ArchitecturesLecture Fast Translation: Translation Buffer Cache of translated addresses Alpha TLB: 32 entry fully associative... Page-frame Address Page Offset V R W Tag Physical Addr 32:1 MUX Low order 13 bits of Address High order 21 bits of address 34-bit Physical Address TLB...

Virtual Storage SystemCS510 Computer ArchitecturesLecture Selecting the Page Size Reasons for larger page size –Page table size is inversely proportional to the page size; memory can be saved with larger page, i.e. with smaller PT –Fast cache hit time, easy when cache  page size (VA caches); bigger page is feasible as cache size grows –Transferring larger pages to or from secondary storage, possibly over a network, is more efficient –Number of TLB entries are restricted by clock cycle time, so a larger page size maps more memory, thereby reducing TLB misses Reasons for a smaller page size –Fragmentation: don’t waste storage; data must be contiguous within page –Quicker process start for small pages(??) Hybrid solution: multiple page sizes –Alpha: 8KB, 16KB, 32 KB, 64 KB pages (43, 47, 51, 55 virt addr bits)

Virtual Storage SystemCS510 Computer ArchitecturesLecture Alpha VM Mapping “64-bit” address divided into 3 segments –seg0 (bit 63=0): user code/heap –seg1 (bit 63 = 1, 62 = 1): user stack –kseg (bit 63 = 1, 62 = 0): kernel segment for OS Seg0/Seg1 000 … 0 or selector 111 … 1 Level1 Level2 Level3 Page Offset L1 Page Tbl + + L2 Page Tbl L3 Page Tbl Physical Page-frame No. Page Offset Main Memory Address Virtual Address Physical Address 8 bytes 32-bit address 32 bits fields Page Table Base Register Three-level page table, each fits in one page Alpha: only 43 unique bits of VA (future min page size up to 64KB => 55 bits of VA) PTE bits; valid, kernel & user read & write enable (No reference, use, or dirty bit)