TLB (Translation Lookaside Buffer) or associative memory: TLB is a hardware device inside the MMU (Memory Management Unit) which is used for mapping virtual address space to physical memory. It is used for increasing the speed of paging.
A TLB entry has the following fields:
1) Virtual page number: It is the page number of a page in a virtual address space.
2) Valid bit: It is used to specify if the entry is in use or not.
3) Modified bits: It is used for tracking if the page is modified or not.
4) Protection bits: It is used for controlling read, write and execute permissions.
5) Page frame: It is the page frame in physical memory.
TLB miss: A TLB miss happens when the page or the referenced page is not in TLB. It can be classified as:
Hard miss: This is the type of TLB miss where page is not in memory and TLB. To handle it, disk access is required.
Soft miss: This is the type of TLB miss where referenced page is not in TLB, but it is in the memory. To handle this, the TLB has to be updated. It is faster than a hard miss.