11-Memory management-TLB PDF
11-Memory management-TLB PDF
Spring 2019
1
Translation look-aside Buffer
• TLB caches virtual-to-physical address translation
• TLB is a small cache that speeds up the translation
of virtual addresses to the physical addresses
• It is not a Data Cache or Instruction Cache. Those
are separate
• TLB simply caches translations from virtual page
number to physical page number so the MMU
don’t have to access page-table in the memory too
often.
2
TLBs – Translation Lookaside Buffers
• Disadvantages
• process that needs more pages has larger page
table
6
TLB Coverage
• Max amount of memory mapped by TLB
• Max mount of memory that can be accessed without TLB misses
• Of course, both examples above are impractical and meant to illustrate the tradeoffs.
• But what if P is something reasonable, but greater than than the standard 4KB?
7
Superpages
⬥Memory pages of larger sizes than standard pages
⬥supported by most modern CPUs
⬥Constraints:
⬥contiguous (physically and virtually)
⬥aligned (physically and virtually)
⬥uniform protection attributes
⬥one reference bit, one dirty bit
A superpage TLB
virtual memory
TLB
physical memory
9
References
• Chapter 3: Modern Operating Systems, Andrew S. Tanenbaum
• X86 architecture
• http://en.wikipedia.org/wiki/X86
• Memory segment
• http://en.wikipedia.org/wiki/Memory_segment
• Memory model
• http://en.wikipedia.org/wiki/Memory_model
10