0
$\begingroup$

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

$\endgroup$
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, privacy policy and cookie policy

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