Professional Documents
Culture Documents
Modern Virtual Memory Systems: Based On The Material Prepared by Arvind and Krste Asanovic
Modern Virtual Memory Systems: Based On The Material Prepared by Arvind and Krste Asanovic
Arvind
6.823 L10-2
Page Fault
Update TLB Protection Physical
(OS loads page) Address
Fault
(to cache)
SEGFAULT
October 17, 2005
6.823 L10-3
Arvind
Topics
• Interrupts
• Modern Usage
Interrupts:
altering the normal flow of control
Ii-1 HI1
interrupt
program Ii HI2 handler
Ii+1 HIn
Causes of Interrupts
Interrupt: an event that requests the attention of the processor
Asynchronous Interrupts:
Interrupt Handler
Synchronous Interrupts
Inst. Data
PC D Decode E + M W
Mem Mem
Asynchronous Interrupts
Inst. Data
PC D Decode E + M W
Mem Mem
Cause
Exc Exc Exc
D E M
EPC
PC PC PC
Select D E M Asynchronous
Handler Kill F Kill D Kill E Kill
PC Stage Stage Stage Interrupts Writeback
Topics
• Interrupts
• Modern Usage
PA
VA Physical Primary
CPU TLB
Cache Memory
VA2
Virtual cache can have two
copies of same physical data.
Two virtual pages share
Writes to one copy not visible
one physical page
to reads of other!
Direct-map Cache
TLB k
2L blocks
2b-byte block
PA PPN Page Offset
Tag
=
Physical Tag Data
hit?
Index L is available without consulting the TLB
⇒ cache and TLB accesses can begin simultaneously
Tag comparison is made after both accesses are completed
Associative Organization
Virtual
VA VPN a L = k-b b 2a
Index
Direct-map Direct-map
TLB k 2L blocks 2L blocks
Phy.
PA PPN Page Offset Tag
= =
Tag hit? 2a
Data
a
After the PPN is known, 2 physical tags are compared
= hit?
Tag
L1
Instruction Memory
Cache Memory
Unified L2
CPU
Cache Memory
L1 Data
RF Memory
Cache
Direct-Mapped L2
• VA1 will be purged from L1 and L2, and
VA2 will be loaded ⇒ no aliasing !
October 17, 2005
6.823 L10-21
Virtually-Addressed L1:
Arvind
Anti-Aliasing using L2
Virtual
VA VPN Page Offset b Index & Tag
VA1 Data
TLB
VA2 Data
6.823 L10-23
Arvind
Topics
• Interrupts
• Modern Usage
updated
(Processor Level 1
Register) Page Table
Level 2
page in primary memory Page Tables
page in secondary memory
Why?__________________________________
Atlas Revisited
• One PAR for each physical page
PAR’s
• PAR’s contain the VPN’s of the
pages resident in primary memory
PPN
VPN
• Advantage: The size is
proportional to the size of the
primary memory
User map
Global
System Physical
Level A map
Address Memory
Space Level B
User map
PA of Seg Table +
per process PA
hashP
Hashed Page Table
PA of Page Table + PA
system-wide
0 27 39
[ IBM numbers bits
with MSB=0 ] 40-bit PA PPN Offset
October 17, 2005
6.823 L10-31
Arvind
VPN d 80-bit VA
Page Table
Offset PA of Slot
hash + VPN
VPN
PPN
Base of Table
configuration in product
Thank you !