kaki-epithesi@home:~$

Cache Addresses

  • Virtual memory is a facility that allows program to address memory from a logical point of view, without regard to the amount of main memory physically available.

  • When virtual memory is used all the address fields of machine instruction contain virtual addresses from read to write, from main memory, a hardware memory management (MMU) converts each virtual address into a physical address in main memory.

  • When virtual addressa are used, there are two ways by which the position of the cache memory can be determined.

    • Between processor and the main memory [LOGICAL CACHE].
    • Between MMU and main memory [PHYSICAL CACHE].

Fig : Logical Cache

Fig : Physical Cache

  • A logical cache stores data using virtual address. The processor can directly access the cache.

  • A physical cache stores data using main memory physical address.

  • Advantages of logical cache, cache access speed is faster than physical cache, because the cache can rspond before the MMU performs address translation.

  • Disadvantage, Most virtual memory systems supply each application with the same virtual memory that starts with 0. The same virtual address in two different applications refers to two different physical address. Thus the cache memory must flushed with each application context switch or extra bits must be added to the each line of cache for identification.