1,898 views
0 votes
0 votes
True or False : if there is Hit in TLB than there won't be page fault ??

Give reason

2 Answers

Best answer
6 votes
6 votes
Lot of discussion on it. So, trying to summarize:

TLB entry present - we have a valid address translation - so page address is valid (page frame is present in main memory).

Can we still get page fault - yes, if the memory address is illegal access, we can get page fault as when we try to write to a Read Only page.
selected by
3 votes
3 votes

TLB is a cache specially designed for page table mappings. Each entry in the TLB has the two basic fields: a tag field , a data field which is the size of the physical page number (pointer to that location), and several bits that indicate the status of the TLB line or of the page associated with it. These bits usually are a dirty bit which indicates if the corresponding page has been written, a reference bit which indicates if the corresponding page has been accessed, and a write protection bit which indicates if writes are allowed in the corresponding page.

At every memory reference the TLB is accessed with the virtual page number field of the virtual address. If there is a hit (hit can be said only by looking $\color{green}{valid-bit = 1}$), then, TLB (Hardware) returns frame no. of the frame where the page is present If there is a miss in the TLB (this is also called translation), the control must determine if there is a real page fault or a simple TLB miss.

TLB miss can be quickly resolved by updating the TLB entry with the proper information from the page table residing in main memory. In the case of a page fault the CPU gets interrupted, and the interrupt handler will take the necessary steps to service the fault.

PS:) Page fault refers to the scenario where the obtained translation cannot be effectively used. It may be a missing page or a dirty page or access permission mismatch. So, a TLB hit can still lead to a page fault.

edited by

Related questions

0 votes
0 votes
0 answers
2
Senthilkar asked Aug 11, 2018
167 views
Consider the system with four type Of resource. Which of the following statstateme is true
0 votes
0 votes
0 answers
3
3 votes
3 votes
1 answer
4
papesh asked Nov 13, 2016
305 views
i know there is deadlock, what about the starvation??