When using physical addresses directly, there is no virtual to
physical translation overhead. Assume it takes 100 nanoseconds to
make a memory reference. If we used physical addresses directly, then
all memory references will take 100 nanoseconds each.
- If we use virtual addresses with page tables to do the translation,
then without a TLB we must first access the page table to get the
approprate page table entry (PTE) for translating an address, do the
translation, and then make a memory reference. Assume it also takes
100 nanoseconds to access the page table and do the translation. In
this scheme, what is the effective memory reference time (time to
access the page table + time to make the memory reference)?
- If we use a TLB, PTEs will be cached so that translation can
happen as part of referencing memory. But, TLBs are very limited in
size and cannot hold all PTEs, so not all memory references will hit
in the TLB. Assume translation using the TLB adds no extra time and
the TLB hit rate is 75%. What is the effective average memory
reference time with this TLB?
- If we use a TLB that has a 99.5% hit rate, what is the effective
average memory reference time now? (This hit rate is close to what
TLBs typically achieve in practice.)