Advanced Computer Architecture Lecture 14

Slides:



Advertisements
Similar presentations
SE-292 High Performance Computing
Advertisements

361 Computer Architecture Lecture 15: Cache Memory
SE-292 High Performance Computing Memory Hierarchy R. Govindarajan
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
Performance of Cache Memory
Fall EE 333 Lillevik480f05-a3 University of Portland School of Engineering EE 333 Final Exam December 15, 2005 Instructions 1.Print your name, student.
Fall EE 333 Lillevik480f05-a2 University of Portland School of Engineering EE 333 Exam 2 November 10, 2005 Instructions 1.Print your name, student.
Fall EE 333 Lillevik 333f06-s3 University of Portland School of Engineering Computer Organization Final Exam Study Final Exam Tuesday, December.
Fall EE 333 Lillevik333f06-e2 University of Portland School of Engineering EE 333 Exam 2 November 9, 2006 Instructions 1.Print your name, student.
Fall EE 333 Lillevik 333f06-l20 University of Portland School of Engineering Computer Organization Lecture 20 Pipelining: “bucket brigade” MIPS.
1 Recap: Memory Hierarchy. 2 Unified vs.Separate Level 1 Cache Unified Level 1 Cache (Princeton Memory Architecture). A single level 1 cache is used for.
Spring EE 437 Lillevik 437s06-l2 University of Portland School of Engineering Advanced Computer Architecture Lecture 2 NSD with MUX and ROM Class.
Spring EE 437 Lillevik 437s06-l8 University of Portland School of Engineering Advanced Computer Architecture Lecture 8 Project 3: memory agent Programmed.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
CSL718 : Memory Hierarchy Cache Memories 6th Feb, 2006
Spring EE 437 Lillevik 437s06-l21 University of Portland School of Engineering Advanced Computer Architecture Lecture 21 MSP shared cached MSI protocol.
Lecture 19 Today’s topics Types of memory Memory hierarchy.
Spring EE 437 Lillevik 437s06-l9 University of Portland School of Engineering Advanced Computer Architecture Lecture 9 DMA controller design.
Spring EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.
Fall EE 333 Lillevik 333f06-l23 University of Portland School of Engineering Computer Organization Lecture 23 RAID Input/output design RS232 serial.
Fall EE 333 Lillevik 333f06-l14 University of Portland School of Engineering Computer Organization Lecture 14 Memory hierarchy, locality Memory.
Caches Where is a block placed in a cache? –Three possible answers  three different types AnywhereFully associativeOnly into one block Direct mappedInto.
Lecture 08: Memory Hierarchy Cache Performance Kai Bu
Lecture Objectives: 1)Explain the relationship between miss rate and block size in a cache. 2)Construct a flowchart explaining how a cache miss is handled.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
Processor Memory Processor-memory bus I/O Device Bus Adapter I/O Device I/O Device Bus Adapter I/O Device I/O Device Expansion bus I/O Bus.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 5:
Spring EE 437 Lillevik 437s06-l5 University of Portland School of Engineering Advanced Computer Architecture Lecture 5 Slave bus agent ROM example.
Spring EE 437 Lillevik 437s06-l22 University of Portland School of Engineering Advanced Computer Architecture Lecture 22 Distributed computer Interconnection.
Computer Organization CS224 Fall 2012 Lessons 39 & 40.
COMPSYS 304 Computer Architecture Cache John Morris Electrical & Computer Enginering/ Computer Science, The University of Auckland Iolanthe at 13 knots.
Fall EE 333 Lillevik 333f06-l16 University of Portland School of Engineering Computer Organization Lecture 16 Write-through, write-back cache Memory.
Spring EE 437 Lillevik 437s06-l4 University of Portland School of Engineering Advanced Computer Architecture Lecture 4 Project 1 reviews CPU controller.
DIRECT MEMORY ACCESS and Computer Buses
CMSC 611: Advanced Computer Architecture
Translation Lookaside Buffer
CS 704 Advanced Computer Architecture
Bus Interfacing Processor-Memory Bus Backplane Bus I/O Bus
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Processor support devices Part 2: Caches and the MESI protocol
Cache Memory and Performance
CS 152 Computer Architecture and Engineering Lecture 18: Snoopy Caches
CSC 4250 Computer Architectures
Computer Engineering 2nd Semester
CS 704 Advanced Computer Architecture
Computer Hardware Can you name some computer components?
CS 286 Computer Organization and Architecture
Cache Memory Presentation I
CS-301 Introduction to Computing Lecture 17
Lecture 6 Memory Hierarchy
CS703 - Advanced Operating Systems
CACHE MEMORY.
CSCI 315 Operating Systems Design
CSCI206 - Computer Organization & Programming
Lecture 08: Memory Hierarchy Cache Performance
CPE 631 Lecture 05: Cache Design
Chapter 5 Exploiting Memory Hierarchy : Cache Memory in CMP
Miss Rate versus Block Size
Morgan Kaufmann Publishers Memory Hierarchy: Cache Basics
Motherboard External Hard disk USB 1 DVD Drive RAM CPU (Main Memory)
CS 3410, Spring 2014 Computer Science Cornell University
Update : about 8~16% are writes
Cache Memory Rabi Mahapatra
How does the CPU work? CPU’s program counter (PC) register has address i of the first instruction Control circuits “fetch” the contents of the location.
Advanced Computer Architecture Lecture 11
Advanced Computer Architecture Lecture 10
Overview Problem Solution CPU vs Memory performance imbalance
Advanced Computer Architecture Lecture 19
Advanced Computer Architecture Lecture 3
Presentation transcript:

Advanced Computer Architecture Lecture 14 Project 4 review Write-back cache correction Write buffer Performance Lillevik 437s06-l14 University of Portland School of Engineering

Project 4 team review Team Dog Lillevik 437s06-l14 University of Portland School of Engineering

Cache block diagram R/W# Main Driver System enable Bus Control enable tag R/W# Lillevik 437s06-l14 University of Portland School of Engineering

Find types of cache in PC? Memory CPU End of a bus Veda, sound, net DMA Wireless, CD, HD Lillevik 437s06-l14 University of Portland School of Engineering

Write-back, cache hit Read Write Data provided by cache memory Fast Data written to cache (fast) Data NOT written to memory, inconsistency exists Lillevik 437s06-l14 University of Portland School of Engineering

Write-back, cache miss Two cases Memory and cache consistent Memory and cache inconsistent (cache has correct data) Called modified Called dirty All misses to inconsistent cache and memory require a write-back cycle first Lillevik 437s06-l14 University of Portland School of Engineering

Write-back, read miss Cache consistent Cache inconsistent Data provided by main memory (slow) Data also written to cache (update) Cache inconsistent Data in cache written to memory (slow): WB Lillevik 437s06-l14 University of Portland School of Engineering

Write-back, write miss Cache consistent Cache inconsistent Data written to cache (fast) Data NOT written to memory, inconsistency exists Cache inconsistent Data in cache written to memory (slow): WB Lillevik 437s06-l14 University of Portland School of Engineering

Write-back, read hit R/W# Main Driver System enable Bus Control enable Cache Control Driver R/W# System Bus enable enable tag R/W# Lillevik 437s06-l14 University of Portland School of Engineering

Write-back, write hit R/W# Main Driver System enable Bus Control Cache Control Driver R/W# System Bus enable enable tag R/W# Lillevik 437s06-l14 University of Portland School of Engineering

Write-back, read miss Memory consistent R/W# Main Driver System enable Cache Control Driver R/W# System Bus enable enable tag R/W# Lillevik 437s06-l14 University of Portland School of Engineering

Write-back, read miss Two steps: write-back and memory read Memory inconsistent Main Cache Control Driver R/W# System Bus enable enable tag R/W# Lillevik 437s06-l14 University of Portland School of Engineering

Write-back, write miss Memory consistent R/W# Main Driver System Cache Control Driver R/W# System Bus enable enable tag R/W# Lillevik 437s06-l14 University of Portland School of Engineering

Write-back, write miss? Two steps: write-back and write cache Memory inconsistent Main Cache Control Driver R/W# System Bus enable enable tag R/W# Lillevik 437s06-l14 University of Portland School of Engineering

Cache example CPU: our B2Logic model Memory of 32 words Cache of 8 words Direct mapped Cache and memory at an initial state Lillevik 437s06-l14 University of Portland School of Engineering

Initial memory contents Adr Data 1 2 3 4 5 6 7 8 9 A B C D E F Adr Data 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F Cache Indexb Tagb Data 000 10 001 01 09 010 0A 011 13 100 0C 101 15 110 11 1E 111 17 Lillevik 437s06-l14 University of Portland School of Engineering

Complete the table? Instruction Tagb Indexb Hit type Data 51700 10 111 RH 17 60955 50F00 611AA 50900 51C00 6145A 51100 602A5 Lillevik 437s06-l14 University of Portland School of Engineering

Final memory contents? Memory Cache Adr Data Adr Data Indexb Tagb Data 1 2 3 4 5 6 7 8 9 55 A B C D E F Adr Data 10 11 aa 12 13 14 5a 15 16 17 18 19 1A 1B 1C 1D 1E 1F Cache Indexb Tagb Data 000 001 01 55 010 011 100 10 5a 101 110 111 0f Lillevik 437s06-l14 University of Portland School of Engineering

Write-through write hit SLOW !! Main Cache Control Driver R/W# System Bus enable enable tag R/W# Lillevik 437s06-l14 University of Portland School of Engineering

Write buffer Goal: speed up writes to memory Design Add write buffer (register) between cache and memory Once register written, Ack CPU Write to memory overlaps next instruction, hides memory access time Design Register often a FIFO Typical depth of 4 lines Lillevik 437s06-l14 University of Portland School of Engineering

Write buffer, write hit (or miss) Write-through cache Write buffer, write hit (or miss) Main Cache Control Driver enable R/W# tag System Bus Buffer Lillevik 437s06-l14 University of Portland School of Engineering

Memory write overlaps next instruction Write buffer timing 1st write 2nd write read hit CPU Ack R/W# 1st write 2nd write Memory write overlaps next instruction Lillevik 437s06-l14 University of Portland School of Engineering

Memory performance Metrics: latency, bandwidth Average latency, L Assumes cache latency same for reads and writes Expression may be applied recursively Lillevik 437s06-l14 University of Portland School of Engineering

Find average latency? CPU clocked at 1.5 GHz DDR memory speed is 500 MHz Cache cycle time is 100 ps Hit rate is 0.95 Lillevik 437s06-l14 University of Portland School of Engineering

Write buffer performance Write-through cache Write buffer performance Reads: occur with probability r Writes: occur with probability (1-r) Four possibilities (probabilities) RH = rh = cache hit, Lc RM = r(1-h) = cache miss, Lm WH = (1-r)h = cache hit, Lc WM = (1-r)(1-h) = cache hit, Lc Due to buffer Lillevik 437s06-l14 University of Portland School of Engineering

Find write buffer performance? Lillevik 437s06-l14 University of Portland School of Engineering

Find average latency? Direct mapped cache, write buffer CPU clocked at 1.5 GHz DDR memory speed is 500 MHz Cache cycle time is 100 ps Hit rate is 0.95 One write to every three reads Lillevik 437s06-l14 University of Portland School of Engineering

Lillevik 437s06-l14 University of Portland School of Engineering

Find types of cache in PC? Memory: L1, L2 (data and instruction) Hard drive CD drive Modem, Ethernet controller Graphics controller Serial, parallel port, USB Printer Lillevik 437s06-l14 University of Portland School of Engineering

Find average latency? Lillevik 437s06-l14 University of Portland School of Engineering

Find write buffer performance? Lillevik 437s06-l14 University of Portland School of Engineering

Find average latency? Lillevik 437s06-l14 University of Portland School of Engineering