3 ms·
>" So, _if_ a cache uses virtual addresses for determining whether data ..." I was curious about your "if" caveat. I believe nearly all modern CPUs uses the vi
by bogomipz 10y ago
>" So, _if_ a cache uses virtual addresses for determining whether data ..."
I was curious about your "if" caveat. I believe nearly all modern CPUs uses the virtual address as it doesn't know about the physical addresses no?
- pm215 10y agoThe CPU does know the physical address, because the MMU is part of the CPU; so you can have a physically indexed cache if you want. The problem is just that you can't do the cache lookup in parallel with the MMU physical-to-virtual lookup, so it's slower than if you used a virtually-indexed cache.
- bogomipz 10y agoSure, I didn't articulate my comment very well. I meant to say that the L1-3 caches operate on virtual addresses because they don't know the physical address but the MMU does since all memory access must transit through the MMU.
- Someone 10y agoThe reason for the "_if_" is that I know too little about current hardware to know whether that's the norm, the exception, or extinct, so I tried to be careful. Also, I'm using CPU for (CPU+MMU) because that's the case on all modern CPUs that have a MMU, as far as I know.