CMP 301A Computer Architecture 1 Lecture 3. Outline zQuick summary zMultilevel cache zVirtual memory y Motivation and Terminology y Page Table y Translation.

Slides:



Advertisements
Similar presentations
Virtual Memory In this lecture, slides from lecture 16 from the course Computer Architecture ECE 201 by Professor Mike Schulte are used with permission.
Advertisements

Lecture 8: Memory Hierarchy Cache Performance Kai Bu
Virtual Memory. The Limits of Physical Addressing CPU Memory A0-A31 D0-D31 “Physical addresses” of memory locations Data All programs share one address.
Virtual Memory main memory can act as a cache for secondary storage motivation: Allow programs to use more memory that there is available transparent to.
Computer Organization CS224 Fall 2012 Lesson 44. Virtual Memory  Use main memory as a “cache” for secondary (disk) storage l Managed jointly by CPU hardware.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
CSIE30300 Computer Architecture Unit 10: Virtual Memory Hsin-Chou Chi [Adapted from material by and
Cs 325 virtualmemory.1 Accessing Caches in Virtual Memory Environment.
The Memory Hierarchy (Lectures #24) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer Organization.
CSCE 212 Chapter 7 Memory Hierarchy Instructor: Jason D. Bakos.
Recap. The Memory Hierarchy Increasing distance from the processor in access time L1$ L2$ Main Memory Secondary Memory Processor (Relative) size of the.
1 Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
Cache Memory Adapted from lectures notes of Dr. Patterson and Dr. Kubiatowicz of UC Berkeley.
Chapter 7 Large and Fast: Exploiting Memory Hierarchy Bo Cheng.
331 Lec20.1Fall :332:331 Computer Architecture and Assembly Language Fall 2003 Week 13 Basics of Cache [Adapted from Dave Patterson’s UCB CS152.
Technical University of Lodz Department of Microelectronics and Computer Science Elements of high performance microprocessor architecture Virtual memory.
Csci4203/ece43631 Review Quiz. 1)It is less expensive 2)It is usually faster 3)Its average CPI is smaller 4)It allows a faster clock rate 5)It has a simpler.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
331 Lec20.1Spring :332:331 Computer Architecture and Assembly Language Spring 2005 Week 13 Basics of Cache [Adapted from Dave Patterson’s UCB CS152.
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 CSE SUNY New Paltz Chapter Seven Exploiting Memory Hierarchy.
Lecture 33: Chapter 5 Today’s topic –Cache Replacement Algorithms –Multi-level Caches –Virtual Memories 1.
Virtual Memory Main Memory Magnetic Disk Upper level Lower level.
CMP 301A Computer Architecture 1 Lecture 4. Outline zVirtual memory y Terminology y Page Table y Translation Lookaside Buffer (TLB)
Lecture 19: Virtual Memory
Lecture 15: Virtual Memory EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014, Dr.
1  2004 Morgan Kaufmann Publishers Multilevel cache Used to reduce miss penalty to main memory First level designed –to reduce hit time –to be of small.
July 30, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 8: Exploiting Memory Hierarchy: Virtual Memory * Jeremy R. Johnson Monday.
The Memory Hierarchy 21/05/2009Lecture 32_CA&O_Engr Umbreen Sabir.
IT253: Computer Organization
CSIE30300 Computer Architecture Unit 08: Cache Hsin-Chou Chi [Adapted from material by and
1  1998 Morgan Kaufmann Publishers Recap: Memory Hierarchy of a Modern Computer System By taking advantage of the principle of locality: –Present the.
1 CENG 450 Computer Systems and Architecture Cache Review Amirali Baniasadi
Computer Architecture Ch5-1 Ping-Liang Lai ( 賴秉樑 ) Lecture 5 Review of Memory Hierarchy (Appendix C in textbook) Computer Architecture 計算機結構.
Lecture 08: Memory Hierarchy Cache Performance Kai Bu
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
Nov. 15, 2000Systems Architecture II1 Machine Organization (CS 570) Lecture 8: Memory Hierarchy Design * Jeremy R. Johnson Wed. Nov. 15, 2000 *This lecture.
CS.305 Computer Architecture Memory: Caches Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly made available.
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.
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
Computer Organization CS224 Fall 2012 Lessons 41 & 42.
Virtual Memory Ch. 8 & 9 Silberschatz Operating Systems Book.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 5:
1  1998 Morgan Kaufmann Publishers Chapter Seven.
Improving Memory Access 2/3 The Cache and Virtual Memory
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”
Summary of caches: The Principle of Locality: –Program likely to access a relatively small portion of the address space at any instant of time. Temporal.
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.
High Performance Computing1 High Performance Computing (CS 680) Lecture 2a: Overview of High Performance Processors * Jeremy R. Johnson *This lecture was.
The Memory Hierarchy Lecture 31 20/07/2009Lecture 31_CA&O_Engr. Umbreen Sabir.
CMSC 611: Advanced Computer Architecture Memory & Virtual Memory Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material.
Improving Memory Access The Cache and Virtual Memory
Memory COMPUTER ARCHITECTURE
Lecture 12 Virtual Memory.
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
Part V Memory System Design
CMSC 611: Advanced Computer Architecture
Lecture 23: Cache, Memory, Virtual Memory
5 Basic Cache Optimizations
Lecture 08: Memory Hierarchy Cache Performance
ECE 445 – Computer Organization
CPE 631 Lecture 05: Cache Design
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
CSC3050 – Computer Architecture
Cache - Optimization.
Cache Memory Rabi Mahapatra
Presentation transcript:

CMP 301A Computer Architecture 1 Lecture 3

Outline zQuick summary zMultilevel cache zVirtual memory y Motivation and Terminology y Page Table y Translation Lookaside Buffer (TLB)

Summary: Sources of Cache Misses zCompulsory (cold start, first reference): first access to a block  Misses that would occur even with infinite cache y“Cold” fact of life: not a whole lot you can do about it 1.Increase block size zConflict (collision): yMultiple memory locations mapped to the same cache location 1.Increase cache size 2.Increase associativity 3.Reduce block size “for the same size cache” zCapacity: yCache cannot contain all blocks accessed by the program 1.Increase cache size

4 Summary: Effect of Cache Parameters on Performance Larger cache size + reduces capacity and conflict misses - hit time will increase Higher associativity + reduces conflict misses - may increase hit time Larger block size + reduces compulsory misses and reload - increases conflict misses and miss penalty

5 Summary: The Cache Design Space zSeveral interacting dimensions ycache size yblock size yassociativity yreplacement policy ywrite-through vs. write-back zThe optimal choice is a compromise ydepends on access characteristics ydepends on technology / cost zSimplicity often wins Associativity Cache Size Block Size Bad Good LessMore Factor AFactor B

6 Multilevel cache zUse smaller L1 if there is also L2 zTrade increased L1 miss rate for reduced L1 hit time and reduced L1 miss penalty zReduces average access time CPU L1 L2 DRAM

Multilevel cache – Example You are building a system around a processor running at 2.0 GHz. The processor has a CPI of 0.5 excluding memory stalls. 30% of the instructions are loads and stores. The memory system is composed of separate L1 instruction and data caches that imposes no penalty on hits. The L1-cache has a miss rate of 3% for both instructions and data and has 32-byte blocks. The unified L2 cache has 64-byte blocks and an access time of 25ns. It is connected to the L1 cache by a 256-bit data bus that runs at 500MHz and can transfer one 256-bit bus word per bus cycle. Of all memory references sent to the L2 cache, 90% are satisfied without going to the main memory. The main memory has an access latency of 200ns, after which any number of bus words may be transferred at the rate of one per cycle on the 128-bit-wide 250MHz main memory bus. What is the overall CPI?

Virtual Memory: Motivations zRemove the programming burdens of a small limited amount of main memory yProgrammers moved the data back and forth from the secondary store by overlaying it repeatedly on the primary store  Tricky programming zAllow efficient and safe sharing of memory among multiple programs yEasier to compile each programs to its own address space yVirtual memory then map these virtual addresses to physical addresses yAllow for reallocation “not even necessarily to be contiguous”

Basic Terminology zMain memory acts as a cache for secondary storage “magnetic disk” zPage : Virtual memory block “similar to cache block” zPage Fault: Virtual memory miss “similar to cache miss” zVirtual address: Address generated by the processor zPhysical address: Actual address to access the main memory zAddress Translation: Mapping virtual address to physical one

Virtual Memory Design Decisions zPage fault is very costly (Millions of clock cycles) 1.Use a large page size to amortize from the large access time (4-64 kB) 2.Use fully associative placement to reduce page fault rate 3.Use clever placement algorithms (even software techniques) 4.Use Write back not write through as writing is costly

Virtual to physical Address Mapping