4,460 views

2 Answers

Best answer
18 votes
18 votes
A cache as everyone knows, stores a copy of data from memory in a fast storage near to CPU. Now, in a system with virtual memory, CPU will be working on logical address and this logical address will be translated to physical address by the memory unit before data is fetched from the main memory. So, if we use the cache before this translation, it will be virtually addressed and if we use cache after this translation, it will be physically addressed.

TLB (which is like a cache for page table) is looked up on to perform virtual-physical address translation. So, in a virtually addressed cache, TLB comes after cache and in a physically addressed cache, TLB comes before the cache.

For more reference:
http://cseweb.ucsd.edu/classes/fa10/cse240a/pdf/08/CSE240A-MBT-L18-VirtualMemory.ppt.pdf
selected by

Related questions