cs33-memory

cs33-memory - The Memory Hierarchy The Memory Hierarchy...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The Memory Hierarchy The Memory Hierarchy Some notes adopted from Bryant and O’Hallaron Chapter 5 of B&O The CPU The CPU-Memory Gap Memory Gap http://blogs.sun.com/toddjobson/entry/processors_and_performance_chips_mips Random Random-Access Memory (RAM) Access Memory (RAM) • Key features – RAM is packaged as a chip. – Basic storage unit is a cell (one bit per cell). – Multiple RAM chips form a memory. • Static RAM ( SRAM ) – Each cell stores bit with a six-transistor circuit. etains value indefinitely, as long as it is kept powered. – Retains value indefinitely, as long as it is kept powered. – Relatively insensitive to disturbances such as electrical noise. – Faster and more expensive than DRAM. • Dynamic RAM ( DRAM ) – Each cell stores bit with a capacitor and transistor. – Value must be refreshed every 10-100 ms. – Sensitive to disturbances. – Slower and cheaper than SRAM. Problem: Processor Problem: Processor-Memory Bottleneck Memory Bottleneck Main Memory CPU Reg Processor performance doubled about every 18 months Bus bandwidth evolved much slower Core 2 Duo: Can process at least 256 Bytes/cycle (1 SSE two operand add and mult) Core 2 Duo: Bandwidth 2 Bytes/cycle Latency 100 cycles Solution: Caches Cache Cache • Definition: Computer memory with short access time used for the storage of frequently or recently used instructions or data General Cache Mechanics General Cache Mechanics 8 9 14 3 Cache ata is copied lock zed Smaller, faster, more expensive memory caches a subset of the blocks 4 10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Memory Larger, slower, cheaper memory viewed as partitioned into “blocks” Data is copied in block-sized transfer units 4 4 10 10 General Cache Concepts: Hit General Cache Concepts: Hit 8 9 14 3 Cache Data in block b is needed Request: 14 14 Block b is in cache: Hit! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Memory General Cache Concepts: Miss General Cache Concepts: Miss 8 9 14 3 Cache Data in block b is needed Request: 12 Block b is not in cache: Miss! lock b is fetched from 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Memory Block b is fetched from memory Request: 12 12 12 Block b is stored in cache • Placement policy: determines where b goes • Replacement policy: determines which block gets evicted (victim) Cache Performance Metrics Cache Performance Metrics • Miss Rate – Fraction of memory references not found in cache (misses/references) – Typical numbers: • 3-10% for L1 • can be quite small (e.g., < 1%) for L2, depending on size, etc. it Time • Hit Time – Time to deliver a line in the cache to the processor (includes time to determine whether the line is in the cache) – Typical numbers: • 1-2 clock cycles for L1 • 5-20 clock cycles for L2 • Miss Penalty – Additional time required because of a miss • Typically 50-200 cycles for main memory (Trend: increasing!) Lets think about those numbers Lets think about those numbers • Huge difference between a hit and a miss...
View Full Document

This note was uploaded on 05/11/2011 for the course CS 33 taught by Professor Rohr during the Spring '08 term at UCLA.

Page1 / 42

cs33-memory - The Memory Hierarchy The Memory Hierarchy...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online