1 Lecture 16: Virtual Memory Today: DRAM innovations, virtual memory (Sections 5.3-5.4)

Slides:



Advertisements
Similar presentations
Lecture 19: Cache Basics Today’s topics: Out-of-order execution
Advertisements

1 Lecture 13: Cache and Virtual Memroy Review Cache optimization approaches, cache miss classification, Adapted from UCB CS252 S01.
Lecture 8: Memory Hierarchy Cache Performance Kai Bu
1 Lecture 6: Chipkill, PCM Topics: error correction, PCM basics, PCM writes and errors.
Caching IV Andreas Klappenecker CPSC321 Computer Architecture.
1 Lecture 20: Cache Hierarchies, Virtual Memory Today’s topics:  Cache hierarchies  Virtual memory Reminder:  Assignment 8 will be posted soon (due.
Overview of Cache and Virtual MemorySlide 1 The Need for a Cache (edited from notes with Behrooz Parhami’s Computer Architecture textbook) Cache memories.
CSCE 212 Chapter 7 Memory Hierarchy Instructor: Jason D. Bakos.
Lecture 12: DRAM Basics Today: DRAM terminology and basics, energy innovations.
1 Lecture 14: Cache Innovations and DRAM Today: cache access basics and innovations, DRAM (Sections )
1 Lecture 15: DRAM Design Today: DRAM basics, DRAM innovations (Section 5.3)
1 Lecture 14: Virtual Memory Topics: virtual memory (Section 5.4) Reminders: midterm begins at 9am, ends at 10:40am.
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
1 Lecture 15: Virtual Memory and Large Caches Today: TLB design and large cache design basics (Sections )
1 Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
The Memory Hierarchy II CPSC 321 Andreas Klappenecker.
Lecture 17: Virtual Memory, Large Caches
1 Lecture 13: Cache Innovations Today: cache access basics and innovations, DRAM (Sections )
1 Lecture 14: Virtual Memory Today: DRAM and Virtual memory basics (Sections )
1 Lecture 21: Virtual Memory, I/O Basics Today’s topics:  Virtual memory  I/O overview Reminder:  Assignment 8 due Tue 11/21.
1 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value is stored as a charge.
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy (Part II)
1 Lecture 14: DRAM, PCM Today: DRAM scheduling, reliability, PCM Class projects.
11/10/2005Comp 120 Fall November 10 8 classes to go! questions to me –Topics you would like covered –Things you don’t understand –Suggestions.
1 CSE SUNY New Paltz Chapter Seven Exploiting Memory Hierarchy.
1 Lecture 1: Introduction and Memory Systems CS 7810 Course organization:  5 lectures on memory systems  5 lectures on cache coherence and consistency.
Lecture 19: Virtual Memory
1 Lecture: Virtual Memory, DRAM Main Memory Topics: virtual memory, TLB/cache access, DRAM intro (Sections 2.2)
1 Lecture: Large Caches, Virtual Memory Topics: cache innovations (Sections 2.4, B.4, B.5)
1 Lecture 13: Cache, TLB, VM Today: large caches, virtual memory, TLB (Sections 2.4, B.4, B.5)
1 Virtual Memory Main memory can act as a cache for the secondary storage (disk) Advantages: –illusion of having more physical memory –program relocation.
1 Some Real Problem  What if a program needs more memory than the machine has? —even if individual programs fit in memory, how can we run multiple programs?
1 Lecture 16: Virtual Memory Topics: virtual memory, improving TLB performance (Sections )
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
1 Chapter Seven CACHE MEMORY AND VIRTUAL MEMORY. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4.
1  2004 Morgan Kaufmann Publishers Chapter Seven Memory Hierarchy-3 by Patterson.
1  1998 Morgan Kaufmann Publishers Chapter Seven.
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)
1 Lecture: Virtual Memory Topics: virtual memory, TLB/cache access (Sections 2.2)
1 Lecture: Memory Technology Innovations Topics: state-of-the-art and upcoming changes: buffer chips, 3D stacking, non-volatile cells, photonics Multiprocessor.
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”
1 Lecture: Virtual Memory, DRAM Main Memory Topics: virtual memory, TLB/cache access, DRAM intro (Sections 2.2)
1 Chapter Seven. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value.
1 Lecture: Large Caches, Virtual Memory Topics: cache innovations (Sections 2.4, B.4, B.5)
1 Lecture 16: Main Memory Innovations Today: DRAM basics, innovations, trends HW5 due on Thursday; simulations can take a few hours Midterm: 32 scores.
Improving Memory Access The Cache and Virtual Memory
Memory COMPUTER ARCHITECTURE
Lecture: Large Caches, Virtual Memory
Lecture: Large Caches, Virtual Memory
Some Real Problem What if a program needs more memory than the machine has? even if individual programs fit in memory, how can we run multiple programs?
Lecture: Large Caches, Virtual Memory
Lecture: Memory, Multiprocessors
Lecture 21: Memory Hierarchy
Chapter 8 Digital Design and Computer Architecture: ARM® Edition
Part V Memory System Design
Virtual Memory 4 classes to go! Today: Virtual Memory.
Lecture: DRAM Main Memory
Lecture 23: Cache, Memory, Virtual Memory
Lecture 22: Cache Hierarchies, Memory
Lecture: DRAM Main Memory
Lecture: Cache Innovations, Virtual Memory
Lecture 6: Reliability, PCM
Lecture 24: Memory, VM, Multiproc
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
Lecture 15: Memory Design
Lecture 22: Cache Hierarchies, Memory
Lecture 24: Virtual Memory, Multiprocessors
Lecture 23: Virtual Memory, Multiprocessors
Lecture 13: Cache Basics Topics: terminology, cache organization (Sections )
Presentation transcript:

1 Lecture 16: Virtual Memory Today: DRAM innovations, virtual memory (Sections )

2 DRAM Technology Trends Improvements in technology (smaller devices)  DRAM capacities double every two years, but latency does not change much Power wall: 25-40% of datacenter power can be attributed to the DRAM system Will soon hit a density wall; may have to be replaced by other technologies (phase change memory, STT-RAM) Interconnects may have to be photonic to overcome the bandwidth limitation imposed by pins on the chip

3 Latency and Power Wall Latency and power can be both improved by employing smaller arrays; incurs a penalty in density and cost Latency and power can be both improved by increasing the row buffer hit rate; requires intelligent mapping of data to rows, clever scheduling of requests, etc. Power can be reduced by minimizing overfetch – either read fewer chips or read parts of a row; incur penalties in area or bandwidth

4 Density Wall New emerging non-volatile memories that have better scalability; instead of storing data in the form of charge, data encoded in cell resistance (phase change memory) or in electron spin (spin torque transfer STT-RAM) Phase change memory: the cell can be either amorphous (high resistance, represents zero) or crystalline (low resistance, represents one) Data is written by heating the material and cooling it at different rates (with electrical pulses); short intense pulse  amorphous; long medium pulse  crystalline

5 Phase Change Memory Can also have multi-level cells; each resistance value represents a different encoding; enables scalability Each cell can only be written about 10 times; need many tricks to improve endurance: write on change, shift bits within a row, re-map data to rows, etc. Reads are relatively quick (~50 ns), writes are very slow (~1000 ns) Has potential to replace DRAM, disk, or both in at least some classes of computers 8

6 Photonics A single waveguide carries light that was generated off-chip to multiple “nodes” The nodes can act as transmitters or receivers; transmitters can vary the amplitude of a light signal based on the input electrical signal Since multiple light wavelengths can be multiplexed on a waveguide and because each wavelength can carry a different signal, photonic interconnects have high bandwidth The E  O and O  E conversion overhead means that the photonic signal must travel far enough to out-do an electrical interconnect in terms of latency and power

7 Virtual Memory Processes deal with virtual memory – they have the illusion that a very large address space is available to them There is only a limited amount of physical memory that is shared by all processes – a process places part of its virtual memory in this physical memory and the rest is stored on disk Thanks to locality, disk access is likely to be uncommon The hardware ensures that one process cannot access the memory of a different process

8 Address Translation The virtual and physical memory are broken up into pages Virtual address 8KB page size page offsetvirtual page number Translated to phys page number Physical memory 13 Physical address page offsetphysical page number 13

9 Memory Hierarchy Properties A virtual memory page can be placed anywhere in physical memory (fully-associative) Replacement is usually LRU (since the miss penalty is huge, we can invest some effort to minimize misses) A page table (indexed by virtual page number) is used for translating virtual to physical page number The memory-disk hierarchy can be either inclusive or exclusive and the write policy is writeback

10 TLB Since the number of pages is very high, the page table capacity is too large to fit on chip A translation lookaside buffer (TLB) caches the virtual to physical page number translation for recent accesses A TLB miss requires us to access the page table, which may not even be found in the cache – two expensive memory look-ups to access one word of data! A large page size can increase the coverage of the TLB and reduce the capacity of the page table, but also increases memory wastage

11 TLB and Cache Is the cache indexed with virtual or physical address?  To index with a physical address, we will have to first look up the TLB, then the cache  longer access time  Multiple virtual addresses can map to the same physical address – can we ensure that these different virtual addresses will map to the same location in cache? Else, there will be two different copies of the same physical memory word Does the tag array store virtual or physical addresses?  Since multiple virtual addresses can map to the same physical address, a virtual tag comparison can flag a miss even if the correct physical memory word is present

12 Virtually Indexed Caches 24-bit virtual address, 4KB page size  12 bits offset and 12 bits virtual page number To handle the example below, the cache must be designed to use only 12 index bits – for example, make the 64KB cache 16-way Page coloring can ensure that some bits of virtual and physical address match abcdefabbdef Page in physical memory Data cache that needs 16 index bits 64KB direct-mapped or 128KB 2-way… cdef bdef Virtually indexed cache

13 Cache and TLB Pipeline TLB Virtual address Tag arrayData array Physical tag comparion Virtual page number Virtual index Offset Physical page number Physical tag Virtually Indexed; Physically Tagged Cache

14 Title Bullet