I'm reading, in a simple way, how do TLBs work and I don't understand something:
The TLB references physical memory addresses in its table. It may reside between the CPU and the CPU cache, between the CPU cache and primary storage memory, or between levels of a multi-level cache. The placement determines whether the cache uses physical or virtual addressing. If the cache is virtually addressed, requests are sent directly from the CPU to the cache, and the TLB is accessed only on a cache miss. If the cache is physically addressed, the CPU does a TLB lookup on every memory operation and the resulting physical address is sent to the cache.
Summary: When the TLB is between CPU and CPU cache it uses physical addressing and the CPU does a TLB lookup on every memory operation and the resulting physical address is then sent to the cache.
My question: since the CPU deals with virtual addresses, how is this query performed?
I don't understand: CPU encounters a virtual address -> CPU contacts TLB which is addressed with physical addresses -> ?? -> TLB spits out another physical address
TLB:
| Physical Address | Another Physical Address |
This totally doesn't make sense to me
Taken from wikipedia