Function of Translation Lookaside Buffer (TLB)
Translation Lookaside Buffer:
It is a special type of hardware cache that is used for page tables to reduce the effective access time that is called Translation Lookaside Buffer (TLB).
Function of TLB:
Whenever the processor needs to access a particular page, first of all, it searches the Translation Lookaside Buffer (TLB). The TLB acts like a cache and contains page table entries, those entries must have been recently used or frequently used. If the desired page entry is present in the TLB, it is said to be “TLB hit“. Then the frame number is retrieved and the real address is accessed. If the desired page table entry isn’t present in TLB, it is said to be “TLBMiss“.
Then the processor searches the page map table for the corresponding page table entry. If the bit shows ‘valid‘, then the page is in the main memory, and the processor can retrieve the frame number from the page table entry to form the real address. If the bit shows ‘invalid‘, then the desired page isn’t in main memory and ‘page fault‘ happens.