CSCI 223 Quiz Memory Hierarchy Flashcards
RAM is traditionally packaged as a ?; basic storage unit is normally a ?
chip; cell (one bit per cell)
static RAM (SRAM)
each cell stores a bit with a four or six-transistor circuit; retains value indefinitely, as long as it is kept powered, relatively insensitive to electrical noise (EMI), radiation, etc.; faster and more expensive than DRAM
dynamic RAM (DRAM)
each cell stores bit with a capacitor, one transistor per bit; value must be refreshed every 10-100ms; more sensitive to disturbances (EMI, radiation, …) than SRAM; slower and cheaper than SRAM
DRAM and SRAM are ? memories because
volatile; they lose info. if powered off
nonvolatile memories retain value even if powered off - examples?
ROM, PROM, EPROM, EEPROM, flash memory
ROM
read-only memory: programmed during production
PROM
programmable ROM: can be programmed once after manufacturing
EPROM
erasable PROM: can be bulk erased (UV, X-Ray)
EEPROM (what’s on our system)
electrically erasable PROM: electronic erase capability
flash memory
EEPROMs with partial (sector) erase capability; wears out after about 100,000 erasings
bus
a collection of parallel wires that carry address, data, and control signals; typically shared by multiple devices
memory read transaction & describe
movl A, %eax
CPU places address A on the memory bus
main memory reads A from the memory bus, retrieves word x, and places it on the bus
CPU reads word x from the bus and copies it into the register %eax
memory write transaction & describe
movl %eax, A
CPU places address A on bus; memory reads it and waits for the corresponding data word to arrive
CPU places data word y on the bus
main memory reads data word y from the bus and stores it at address A
which is more complicated: memory read or memory write?
write
describe the “Power Wall”
2003 - decided to increase the number of cores, which decreases the speed but saves power
the CPU-Memory performance gap & key to fixing
the gap widens between DRAM, disk, and CPU speeds; the key to bridging this CPU-Memory gap is locality
principle of locality
programs tend to use data and instructions with addresses near or equal to those they have used recently
temporal locality
recently referenced items are likely to be referenced again
spatial locality
items with nearby addresses tend to be referenced cose together in time