MAIN MEMORY SYSTEM Mahdi Nazm Bojnordi Assistant Professor School - - PowerPoint PPT Presentation
MAIN MEMORY SYSTEM Mahdi Nazm Bojnordi Assistant Professor School - - PowerPoint PPT Presentation
MAIN MEMORY SYSTEM Mahdi Nazm Bojnordi Assistant Professor School of Computing University of Utah CS/ECE 6810: Computer Architecture Overview Announcement Homework 4 submission deadline: Nov. 6 th This and the following lectures
Overview
¨ Announcement
¤ Homework 4 submission deadline: Nov. 6th
¨ This and the following lectures
¤ Dynamic random access memory (DRAM) ¤ DRAM operations ¤ Memory scheduling basics ¤ Emerging memory technologies
Recall: Address Translation
¨ Exploit locality to reduce address translation time
¤ Offset bits are copied from virtual address
Physical Memory
Page Frame 0 Page Frame 1 Page Frame 2 Page Frame N-1 …
Virtual Address Physical Address
- ffset
- ffset
Virtual Page No Page frame No
Recall: Address Translation
¨ Exploit locality to reduce address translation time
¤ OS maintains the page table for address translation
Physical Memory
Page Frame 0 Page Frame 1 Page Frame 2 Page Frame N-1 …
Virtual Address Physical Address
- ffset
- ffset
Virtual Page No Page frame No
Page Table
Recall: Translation Lookaside Buffer
¨ Exploit locality to reduce address translation time
¤ Keep recent translation in a buffer for future references
Physical Memory
Page Frame 0 Page Frame 1 Page Frame 2 Page Frame N-1 …
Virtual Address Physical Address
- ffset
- ffset
Virtual Page No Page frame No
Page Table
1 1
TLB
TLB in Memory Hierarchy
¨ On a TLB miss, is the page loaded in memory?
¤ Yes: takes 10’s cycles to update the TLB ¤ No: page fault
n Takes 1,000,000’s cycles to load the page and update TLB
Processor Core TLB Lookup Cache Main Memory VA hit PA miss Data hit
TLB in Memory Hierarchy
¨ On a TLB miss, is the page loaded in memory?
¤ Yes: takes 10’s cycles to update the TLB ¤ No: page fault
n Takes 1,000,000’s cycles to load the page and update TLB
Processor Core TLB Lookup Cache Main Memory VA hit PA miss Translaltion miss Data hit
TLB in Memory Hierarchy
¨ On a TLB miss, is the page loaded in memory?
¤ Yes: takes 10’s cycles to update the TLB ¤ No: page fault
n Takes 1,000,000’s cycles to load the page and update TLB
Processor Core TLB Lookup Cache Main Memory VA hit PA miss Translaltion miss Data hit Physically indexed, physically tagged: TLB on critical path!
Physically Indexed Caches
¨ Problem: increased critical path due to sequential
access to TLB and cache
Virtual Page No Page Offset TLB Physical Frame Page Offset
Physically Indexed Caches
¨ Problem: increased critical path due to sequential
access to TLB and cache
Virtual Page No Page Offset TLB Physical Frame Page Offset Tag Array Data Array = Data Block hit/miss* Tag Index Byte
Physically Indexed Caches
¨ Problem: increased critical path due to sequential
access to TLB and cache
Virtual Page No Page Offset TLB Physical Frame Page Offset Tag Array Data Array = Data Block hit/miss* Tag Index Byte
Observation: lower address bits (page offset) are not translated
Virtually Indexed Caches
¨ Idea: Index into cache in parallel with page number
translation in TLB
Virtual Page No Page Offset TLB Tag Array Data Array = Data Block hit/miss* Tag Index Byte
Virtually Indexed Caches
¨ Idea: Index into cache in parallel with page number
translation in TLB
Virtual Page No Page Offset TLB Tag Array Data Array = Data Block hit/miss* Tag Index Byte
what if the page offset is not equal to index+byte?
Main Memory
Computer System Overview
¨ DRAM technology is commonly used for main
memory
Computer System Overview
¨ DRAM technology is commonly used for main
memory
CPU
Computer System Overview
¨ DRAM technology is commonly used for main
memory
CPU Memory
Computer System Overview
¨ DRAM technology is commonly used for main
memory
CPU Memory
¨ SRAM is used for
caches
¨ DRAM is used for
main memory
¨ DRAM is accessed
- n a TLB or last
level cache miss
Static vs. Dynamic RAM
Static RAM (SRAM) Dynamic RAM (DRAM)
wordline bitline bitline wordline bitline
Static vs. Dynamic RAM
¨ Fast and leaky
¤ 6 transistors per bit ¤ Normal CMOS Tech.
¨ Static volatile
¤ Retain data as long as
powered on
¨ Dense and slow
¤ 1 transistor per bit ¤ Special DRAM process
¨ Dynamic volatile
¤ Periodic refreshing is
required to retain data
Static RAM (SRAM) Dynamic RAM (DRAM)
DRAM Organization
¨ DRAM array is organized as rowscolumns
DRAM Organization
¨ DRAM array is organized as rowscolumns
wordline bitline
DRAM Organization
¨ DRAM array is organized as rowscolumns
decoder
wordline bitline
DRAM Organization
¨ DRAM array is organized as rowscolumns
decoder Sense Amplifier row buffer
wordline bitline
DRAM Organization
¨ DRAM array is organized as rowscolumns
decoder Sense Amplifier row buffer
wordline bitline
Data Block multiplexer
DRAM Organization
¨ DRAM array is organized as rowscolumns
decoder Row Address Column Address Sense Amplifier row buffer
wordline bitline
Data Block multiplexer
DRAM Organization
¨ DRAM array is organized as rowscolumns
decoder Row Address Column Address Sense Amplifier row buffer
wordline bitline
Data Block multiplexer All reads and writes are performed through the row buffer
DRAM Row Buffer
¨ All reads and writes are performed through RB
Data Array Row Buffer (RB) DRAM Cell DRAM Sense Amp. Row Access Strobe (RAS) Column Access Strobe (CAS)
Reading DRAM Cell
¨ DRAM read is destructive
¤ After a read, contents of cells are destroyed
Precharge Activate Sense Reading a zero Reading a one
Reading DRAM Cell
¨ DRAM read is destructive
¤ After a read, contents of cells are destroyed
Precharge Activate Sense Reading a zero Reading a one
V/2 ?
Reading DRAM Cell
¨ DRAM read is destructive
¤ After a read, contents of cells are destroyed
Precharge Activate Sense Reading a zero Reading a one
V/2 ? 1 V/2 ?
Reading DRAM Cell
¨ DRAM read is destructive
¤ After a read, contents of cells are destroyed
Precharge Activate Sense Reading a zero Reading a one
V/2 ? 1 V/2 ? 1 V/2 +
Reading DRAM Cell
¨ DRAM read is destructive
¤ After a read, contents of cells are destroyed
Precharge Activate Sense Reading a zero Reading a one
V/2 ? 1 V/2 ? 1 V/2 + V/2 ?
Reading DRAM Cell
¨ DRAM read is destructive
¤ After a read, contents of cells are destroyed
Precharge Activate Sense Reading a zero Reading a one
V/2 ? 1 V/2 ? 1 V/2 + V/2 ? 1 V/2 ?
Reading DRAM Cell
¨ DRAM read is destructive
¤ After a read, contents of cells are destroyed
Precharge Activate Sense Reading a zero Reading a one
V/2 ? 1 V/2 ? 1 V/2 + V/2 ? 1 V/2 ? 1 V/2 - V