CSCE 212 Quiz 11 – 4/13/11 Given a direct-mapped cache with 8 one-word blocks and the following 32-bit memory address references: 1 2, 10000110 2, 11010100.

Slides:



Advertisements
Similar presentations
Cache Memory Exercises. Questions I Given: –memory is little-endian and byte addressable; memory size; –number of cache blocks, size of cache block –An.
Advertisements

Malloc & VM By sseshadr. Agenda Administration – Process lab code will be inked by Thursday (pick up in ECE hub) – Malloc due soon (Thursday, November.
Recitation 7 Caching By yzhuang. Announcements Pick up your exam from ECE course hub ◦ Average is 43/60 ◦ Final Grade computation? See syllabus
CSC1016 Coursework Clarification Derek Mortimer March 2010.
Using one level of Cache:
The Lord of the Cache Project 3. Caches Three common cache designs: Direct-Mapped store in exactly one cache line Fully Associative store in any cache.
Computer ArchitectureFall 2007 © November 14th, 2007 Majd F. Sakr CS-447– Computer Architecture.
CS61C L31 Caches II (1) Garcia, Fall 2006 © UCB GPUs >> CPUs?  Many are using graphics processing units on graphics cards for high-performance computing.
How caches take advantage of Temporal locality
Memory Hierarchies Exercises [ ] Describe the general characteristics of a program that would exhibit very little spatial or temporal locality with.
CSCE 212 Quiz 8 – 3/23/11 1.What type of element is the ALU (combinational or state) and what does it mean for an element to be that type? 2.What is the.
COMP3221: Microprocessors and Embedded Systems Lecture 26: Cache - II Lecturer: Hui Wu Session 2, 2005 Modified from.
LRU Replacement Policy Counters Method Example
Computer ArchitectureFall 2007 © November 12th, 2007 Majd F. Sakr CS-447– Computer Architecture.
Caches The principle that states that if data is used, its neighbor will likely be used soon.
CS 61C L21 Caches II (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
Direct Map Cache Tracing Exercise. Exercise #1: Setup Information CS2100 Cache I 2 Memory 4GB Memory Address 310N-1N Block Number Offset 1 Block = 8 bytes.
5/27/99 Ashish Sabharwal1 Cache Misses - The 3 C’s n Compulsory misses –cold start –don’t have a choice –except that by increasing block size, can reduce.
COEN 180 Main Memory Cache Architectures. Basics Speed difference between cache and memory is small. Therefore:  Cache algorithms need to be implemented.
Lecture 31: Chapter 5 Today’s topic –Direct mapped cache Reminder –HW8 due 11/21/
Caches – basic idea Small, fast memory Stores frequently-accessed blocks of memory. When it fills up, discard some blocks and replace them with others.
Cache memory October 16, 2007 By: Tatsiana Gomova.
Caches – basic idea Small, fast memory Stores frequently-accessed blocks of memory. When it fills up, discard some blocks and replace them with others.
Lecture Objectives: 1)Define set associative cache and fully associative cache. 2)Compare and contrast the performance of set associative caches, direct.
Cache Basics Define temporal and spatial locality.
Ch. 12 Cache Direct Mapped Cache. Comp Sci mem hierarchy 2 Memory Hierarchy Registers: very few, very fast cache memory: small, fast main memory:
CSCI 232© 2005 JW Ryder1 Cache Memory Organization Direct Mapping Fully Associative Set Associative (very popular) Sector Mapping.
1 CMPE 421 Advanced Computer Architecture Accessing a Cache PART1.
Tag Cache Main memory Block 0 Block 1 Block 127 Block 128 Block 129 Block 255 Block 256 Block 257 Block 4095 Block 0 Block 1 Block Main memory address.
ACOE2011 Cache memory Homework – Q1 A computer has a 32 bit address and a 64 bit data bus with address resolution to the byte level. The computer is using.
Multiprocessor cache coherence. Caching: terms and definitions cache line, line size, cache size degree of associativity –direct-mapped, set and fully.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
CML CML CS 230: Computer Organization and Assembly Language Aviral Shrivastava Department of Computer Science and Engineering School of Computing and Informatics.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
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.
Caching Chapter 7.
DECStation 3100 Block Instruction Data Effective Program Size Miss Rate Miss Rate Miss Rate 1 6.1% 2.1% 5.4% 4 2.0% 1.7% 1.9% 1 1.2% 1.3% 1.2% 4 0.3%
Additional Slides By Professor Mary Jane Irwin Pennsylvania State University Group 1.
Cache Memory. Reading From Memory Writing To Memory.
Cache Operation.
CAM Content Addressable Memory
CSE 351 Caches. Section Feedback Before we begin, we’d like to get some feedback about section If you could answer the following questions on the provided.
Memory Hierarchy and Cache Design (4). Reducing Hit Time 1. Small and Simple Caches 2. Avoiding Address Translation During Indexing of the Cache –Using.
Computer Organization CS224 Fall 2012 Lessons 37 & 38.
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.
Memory Hierarchy and Cache Design (3). Reducing Cache Miss Penalty 1. Giving priority to read misses over writes 2. Sub-block placement for reduced miss.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Cache Memory.
Fall EE 333 Lillevik 333f06-l16 University of Portland School of Engineering Computer Organization Lecture 16 Write-through, write-back cache Memory.
Chapter 9 Memory Organization. 9.1 Hierarchical Memory Systems Figure 9.1.
COSC2410: LAB 19 INTRODUCTION TO MEMORY/CACHE DIRECT MAPPING 1.
CSCI2510 Tutorial 5 Introduction to Cache Zong Wen
CSCI206 - Computer Organization & Programming
DREAM TEAM 2 Roto, Holiano, Chaka
Address – 32 bits WRITE Write Cache Write Main Byte Offset Tag Index Valid Tag Data 16K entries 16.
Tutorial Nine Cache CompSci Semester One 2016.
CAM Content Addressable Memory
Direct Cache Structure
Consider a Direct Mapped Cache with 4 word blocks
CACHE MEMORY.
Exploiting Memory Hierarchy Chapter 7
Directory-based Protocol
CSCI206 - Computer Organization & Programming
FIGURE 12-1 Memory Hierarchy
Set-Associative Cache
Interconnect with Cache Coherency Manager
Lecture 22: Cache Hierarchies, Memory
Help! How does cache work?
Direct Mapping.
Basic Cache Operation Prof. Eric Rotenberg
4 + (-5) = A. Start at zero B. Move ______ spaces ___________ to get to the first number. C. From there, move _____ spaces __________ D. My final answer.
Presentation transcript:

CSCE 212 Quiz 11 – 4/13/11 Given a direct-mapped cache with 8 one-word blocks and the following 32-bit memory address references: 1 2, , , 1 2, Show the final state of the cache after the accesses and tell whether each reference is a hit or miss. *You will need to show the block index, valid bit, tag, and data. Don’t worry about leading zeros in the tag. EC: Do the same for a cache with 4 two-word blocks.

CSCE 212 Quiz 11 Answers 1 2, , , 1 2, M MM H M IndexVTagData 0N 1Y Memory(1) 2N 3N 4Y Memory( ) 5N 6Y Memory( ) 7Y Memory( )

CSCE 212 Quiz 11 Answers 1 2, , , 1 2, M MM H H IndexVTagData 0Y Memory(0) Y Memory(1) 1N N 2Y Memory( ) Y Memory( ) 3Y Memory( ) Y Memory( )