Lecture 009

Memory Abstraction

Memory Write Structure

Memory Write Structure

Memory in Practice

SRAM and DRAM

SRAM and DRAM

SRAM and DRAM Metrics

SRAM and DRAM Metrics

S-RAM(MB): expensive, big, fast, used in cache D-RAM(GB): cheap, small, slow, main memories, frame buffers

Operations in DRAM

Reading

64MB memory module has 8x 8M DRAMs to provide 64 bits data in parallel

Locality

CPU-Memory Gap: Gap is the Issue

CPU-Memory Gap: Gap is the Issue

Principle of Locality: programs tend to use data and instructions with address near or equal to those they have used recently

Memory Hierarchy

Memory Hierarchy

Cache

Cache (L1, L2, L3): usually made of S-RAM, usually in CPU core, to provide fast cache from D-RAM.

Cache Policy

...

Cache Misses

Cold (compulsory) miss: when starts empty, first reference to the block (nothing in the cache right now)

Capacity miss: when working set is larger than the cache (no enough cache space to store all needed data for a program, cache is full and your data is not here)

Conflict miss: when multiple objects all map to the same level k block (hash collision: block i at Lk+1 must be placed in block i mod 4 at Lk, referencing blocks 0, 8, 0, 8,... will miss every time)

Caching in Memory Hierarchy

Caching in Memory Hierarchy

Storage

Storage Technology

Storage Technology

Disk

Plutters and Heads

Plutters and Heads

Platters -> Surfaces -> Tracks -> Sectors -> Gaps

Platters -> Surfaces -> Tracks -> Sectors -> Gaps

Capacity: maximum number of bits that can be stored.

Disk Operation in Multi-Platter View

Disk Operation in Multi-Platter View

Disk Latency Access by Time

Disk Latency Access by Time

Reading a Disk to Memory:

  1. CPU send command to disk controller
  2. Disk memory transfer to Main memory
  3. Disk controller send interrupt notification to CPU

Writing to a Disk from Memory:

  1. CPU tell disk a specific memory location
  2. Disk read memory out to Disk

Non-volatile Memory

Non-volatile: retain value even if powered off

Types of Non-volatile

Solid State Disk (SSD)

Table of Content