0
$\begingroup$

If not, then why aren't all the pages loaded into the TLB so that TLB misses never happen.

$\endgroup$
2
  • $\begingroup$ Yes, a TLB is usually very small, yet very fast $\endgroup$
    – nir shahar
    Jun 15, 2021 at 18:26
  • $\begingroup$ en.wikipedia.org/wiki/… $\endgroup$
    – D.W.
    Jun 15, 2021 at 19:12

2 Answers 2

1
$\begingroup$

The number of entries in the TLB is limited and keep in mind that there are multiple levels of TLBs. So the higher the level, the more entries they typically have. For more detailed information have a look at the following page for Skylake.

Wat you are referring to is a minor page fault; so there is no matching entry for a page in the TLB, but the page is in memory.

You can also have a major page fault, the entry isn't in the TLB + isn't in memory. It needs to be loaded from disk into memory first before and entry can be placed in the TLB.

So even if your TLB would be infinitely large, you still need TLB misses to deal with major page faults.

$\endgroup$
0
$\begingroup$

The TLB is part of the CPU. So once you bought a CPU and put it in your computer, it's limited. Another more expensive CPU might have a larger TLB, which is still limited.

I can buy a computer with 1500 GB of memory. You'd need a bloody big TLB to have no TLB misses whatsoever.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.