Virtual Memory 3
Virtual Memory 3
Virtual Memory 3
Chapter 18
S. Dandamudi
Outline
• Introduction • Page table placement
• Virtual memory concepts ∗ Searching hierarchical page
tables
∗ Page replacement policies
∗ Write policy • Inverted page table
∗ Page size tradeoff organization
∗ Page mapping • Segmentation
• Page table organization • Example implementations
∗ Page table entries ∗ Pentium
• Translation lookaside ∗ PowerPC
buffer ∗ MIPS
An example
mapping of 32-bit
virtual address to
24-bit physical
address
Virtual to
physical
address
mapping
Translation
using a TLB
Three-level
hierarchical
page table
Pentium’s logical
to physical address
translation
PowerPC’s logical
to physical address
translation process
2003 S. Dandamudi Chapter 18: Page 38
To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer, 2003.
Example Implementations (cont’d)
• PowerPC uses inverted page table
∗ Uses two hash tables
» Primary
– Uses 8-way associative page table entry groups
» Secondary
– 1s complement of the primary hash function
∗ PTEs are 8-bytes wide
» Stores valid bit, reference bit, changed bit (i.e., dirty bit)
» W bit (write-through)
– W = 1: write-through policy
– W = 0: write-back policy
» I bit (cache inhibit)
– I = 1: cache inhibited (accesses main memory directly)
2003 S. Dandamudi Chapter 18: Page 39
To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer, 2003.
Example Implementations (cont’d)
Hash table organization in PowerPC
Virtual to physical
address translation
with 4 KB pages
Virtual to physical
address translation
with 16 MB pages
MIPS TLB
entry format