Docsity

Lecture Slides on Caching - Systems Programming | CS 351, Study notes of Computer Science

Partial preview of the text

Download Lecture Slides on Caching - Systems Programming | CS 351 and more Study notes Computer Science in PDF only on Docsity!

CS351 : Saelee

Caching

von Neuman architecture

SRAM, DRAM, NVRAM, HDD

SRAM

  • (^) S tatic R andom A ccess M emory
    • One bit stored per flip-flop
    • Data stable as long as charge applied

NVRAM

  • (^) N on- V olatile R andom A ccess M emory
    • Data maintained without power
      • e.g., compact flash, SSD
    • Relatively slow access times

HDD

  • (^) H ard D isk D rive
    • Spinning magnetic platters with read/ write heads
  • Seek (tracking) time + rotational latency
  • Slow!

The Memory Hierarchy

Registers On-chip LI cache (SRAM) Off-chip L2 cache (SRAM) Main memory (DRAM) Local hard disk drive(s) Remote storage (e.g. network drives) smaller, faster, costlier larger, slower, cheaper CPU Level 0: Level 1: Level 2: Level 3: Level 4: Level 5: point of reference

Cache

what to cache?

temporal locality

e.g.

repeated function calls

loop counter access

e.g.

array access (stride- k )

sequential control flow

Cache size ≪ Address space