Question

I am having a doubt regarding memory management in operating systems.I know that cache is a temporary storage location used to speed up memory accesses whereas TLB is used to speed up translation from virtual address into physical address.

  1. Now if a virtual memory address is generated,what is the first step taken?
  2. If the first step is referring to the TLB and generating the physical address, what is the second step taken?(is it referring to the cache to see whether that data is stored in the cache)?
  3. Do modern computers use TLBs?
  4. how does the cpu know where the page table is located?
Was it helpful?

Solution

  1. It depends what you mean by "generated". If you really meant "read", then the first step would be to be either to look into the TLB if the address has already been translated or, if your cache supports virtual addresses, to look in the cache itself to see if there is an entry corresponding to that virtual address (and if it belongs to the appropriate process, the virtual address itself is not enough).
  2. If the first step was a virtual to physical translation, then the cache is for physical addresses. Assuming you want to read, then indeed the next step would be to look at the cache.
  3. Yes they do. Most processors using virtual memory use TLB.
  4. Yes, however it depends on your architecture. On an Intel(x86) processor, for instance, the page table pointer is stored into the cr3 register.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top