Modern Computer Memory

a very deep rabbit hole indeed!

What you'll learn

  1. What is an iconoscope?
  2. What did 1MB of RAM cost in 1980?
  3. How modern computer memory works

In the early days

ENIAC

20 words and punchcards

Programmed by rewiring plugs

EDVAC

First stored-program computer

1,000 44-bit words

A memory "crisis"

500x500 grid of pixels gives 250Kb of memory

Modern shared memory layout

What happens before foo = "bar"?

What happens before foo = "bar"?

  1. Create an address space for the process
  2. Load the code from disk
  3. Allocate some memory in the program heap for the value

Exploring the address space

  1. How many bytes can reside in a 64-bit address space?
  2. How does the OS know where to get the first byte of the program's code?
  3. Why doesn't the computer crash if a program uses more than the machine's available physical memory?

Virtual Memory

  • OS abstraction hiding details of physical memory
  • Standardizes addresses
  • Provides process memory isolation (ideally)

Bits all the way down

What do the following lists of numbers have in common?

  • 0.25, 2, 100, 3000
  • .75, 256, 163000000, 524000000

The progression in access time (ns) and KBs of capacity, respectively

Memory hierarchy

In Review

  1. Memory is pretty cheap, but relative costs have stayed constant
  2. There is an inverse relationship between speed and cost
  3. OS provides virtual memory to abstract away physical devices
  4. Hierarchy of memory devices provides excellent avg-case performance