number. A possible state of the TLB for the previous page table example is indicated
in Table 6.2.
Typically, the TLB is implemented as associative cache, and the virtual
page/frame pairs can be mapped anywhere. Here are the steps necessary for an
address lookup, when using a TLB (see Figure 6.17):
1. Extract the page number from the virtual address.
2. Extract the offset from the virtual address.
3. Search for the virtual page number in the TLB.
4. If the (virtual page #,page frame #) pair is found in the TLB, add the offset to
the physical frame number and access the memory location.
5. If there is a TLB miss, go to the page table to get the necessary frame number.
If the page is in memory, use the corresponding frame number and add the offset
to yield the physical address.
6. If the page is not in main memory, generate a page fault and restart the access
when the page fault is complete.