



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




IntroductionCachesMain Memory
Simple main memorySimple main memoryWider memoryInterleaved memoryMemory Technologies
DRAM, SRAM Advances in DRAM technology Virtual Memory
MotivationBasicsAddress translationInteraction with cachesProtection
Consider a memory with these parameters:
1 cycle to send address6 cycles to access each word1 cycle to send word back to CPU/Cache What's the miss penalty for a 4-word block?
6 cycles
1 cycle)
4 words
= 32 cycles
How can we speed this up?
Make the memory wider
Read out 2 (or more) words in parallel Memory parameters:
1 cycle to send address6 cycles to access each
doubleword
1 cycle to send doubleword back to CPU/Cache Miss penalty for a 4-word block:
6 cycles
1 cycle)
2 doublewords
= 16 cycles= 16 cycles
Cost
Wider busLarger expansion size
Organize memory in banks
Subsequent words map to different banksWord A in bank (A mod M)Within a bank, word A in location (A div M)Word address
BankWord in Bank
How many banks to include?
Simple interleaving for sequential accesses
(e.g., cache blocks) Complex interleaving for others
p^
g
(e.g., requests from non-blocking caches)Alternative:
independent
memory banks
Each bank has separate controller, separate address lines,
and maybe separate data lines
Dynamic Random Access Memory (DRAM)
Optimized for density, not speed
One transistor cells Multiplexed address pins
Row Address Strobe (RAS)Column Address Strobe (CAS) Cycle time roughly twice access time
Destructive reads Must refresh every few ms
Access every row Sold as dual inline memory modules (DIMMs)
4 to 16 DRAMs on a board, 8 bytes wide
Static Random Access Memory (SRAM)
Optimized for speed, then density
4-6 transistors per cell
p
Separate address pins Static
No Refresh
Greater power dissipation than DRAMAccess time = cycle time
Normal DRAM
First read entire rowThen select column from rowStores entire row in a buffer Page Mode
Row buffer acts like an SRAMBy changing column address, random bits can be accessed
within a row
page offsettag + pte
TLB
Compare Incoming & Stored Tags
and Select PTE
... ... ...
...
...
...
...
Fast Path
Translation Lookaside Buffer (TLB, TB)A cache w/ PTEs for dataNumber of entries 32 to 1024
page offset
page frame number
Hit/Miss
virtual page number
page offset
Address Translation
PO
VPN
page offset
page frame number
TLB
Cache Lookup
address tag
block offset
index
PFN
PO
BO
IDX
TAG
read tags
m?
m?
hit/miss
Address translation before cache lookup
Small Cache
Large Cache
PO
VPN
PO
VPN
TLB
read tags
TAG
TLB
read tags
BO POIDX
PFN
PO
PFN
BO
IDX
TAG
m?
m?
m?
m?
Small Cache
Address translation in parallel with cache lookup
PO
VPN
BO IDX
TLB
read tags
PFN
PO
TAG
BO IDX
m?
m?
Address translation in parallel with cache lookup
Large Cache
PO
VPN
BO
IDX
TLB
read tags
PFN
PO
TAG
BO
IDX
Index taken from virtual page number
m?
m?
Virtual Address Space
Physical Address Space
V
Tag
Data
V
P
VirtualIndex
V0 V
Address translation after cache miss
TLB
read tags
m?
m?
Needed on misses only
Implies fast-lookup even for large caches Must handle
Virtual-address synonyms (aliases)Virtual-address space changesStatus and protection bit changes