lecture17 - CIS 450 Computer Architecture and Organization...

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

View Full Document Right Arrow Icon
CIS 450 Computer Architecture and Organization Lecture 17: Cache Memories Mitch Neilsen Mitch Neilsen neilsen@ksu.edu neilsen@ksu.edu 219D Nichols Hall 219D Nichols Hall
Background image of page 1

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

View Full DocumentRight Arrow Icon
–2– Topics Topics ± Caching in the memory hierarchy ± Generic cache memory organization ± Direct mapped caches ± Set associative caches ± Impact of caches on performance ± The memory mountain
Background image of page 2
–3– Memory Hierarchies Memory Hierarchies Some fundamental and enduring properties of Some fundamental and enduring properties of hardware and software: hardware and software: ± Fast storage technologies cost more per byte, have less capacity, and require more power (heat!). ± The gap between CPU and main memory speed is widening. ± Well-written programs tend to exhibit good locality. These fundamental properties complement each other These fundamental properties complement each other beautifully. beautifully. They suggest an approach for organizing memory and They suggest an approach for organizing memory and storage systems known as a storage systems known as a memory hierarchy memory hierarchy .
Background image of page 3

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

View Full DocumentRight Arrow Icon
–4– An Example Memory Hierarchy An Example Memory Hierarchy registers on-chip L1 cache (SRAM) main memory (DRAM) local secondary storage (local disks) Larger, slower, and cheaper (per byte) storage devices remote secondary storage (tapes, distributed file systems, Web servers) Local disks hold files retrieved from disks on remote network servers. Main memory holds disk blocks retrieved from local disks. off-chip L2 cache (SRAM) L1 cache holds cache lines retrieved from the L2 cache memory. CPU registers hold words retrieved from L1 cache. L2 cache holds cache lines retrieved from main memory. L0: L1: L2: L3: L4: L5: Smaller, faster, and costlier (per byte) storage devices
Background image of page 4
–5– Caches Caches Cache: Cache: A smaller, faster storage device that acts as a A smaller, faster storage device that acts as a staging area for a subset of the data in a larger, staging area for a subset of the data in a larger, slower device. slower device. Fundamental idea of a memory hierarchy: Fundamental idea of a memory hierarchy: ± For each k, the faster, smaller device at level k serves as a cache for the larger, slower device at level k+1. Why do memory hierarchies work? Why do memory hierarchies work? ± Programs tend to access the data at level k more often than they access the data at level k+1. ± Thus, the storage at level k+1 can be slower, and thus larger and cheaper per bit. ± Net effect: A large pool of memory that costs as much as the cheap storage near the bottom, but that serves data to programs at the rate of the fast storage near the top.
Background image of page 5

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

View Full DocumentRight Arrow Icon
–6– Caching in a Memory Hierarchy Caching in a Memory Hierarchy 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Larger, slower, cheaper storage device at level k+1 is partitioned into blocks.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 56

lecture17 - CIS 450 Computer Architecture and Organization...

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

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