Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

What is meant by cache mapping ? What are different types of mapping ? Discuss different mapping techniques with examples.ORDiscuss the various types of address mapping used in cache memory.

Cache mapping :

Cache mapping is the method by which the contents of main memory are brought into the cache and referenced by the CPU. The mapping method used directly affects the performance of the entire computer system.

Mapping is a process to discuss possible methods for specifying where memory blocks are placed in the cache. Mapping function dictates how the cache is organized.

Types of mapping :

Direct mapping :

a. The direct mapping technique is simple and inexpensive to implement.

b. When the CPU wants to access data from memory, it places an address. The index field of CPU address is used to access address.

    c. The tag field of CPU address is compared with the associated tag in the word read from the cache.

    d. If the tag-bits of CPU address are matched with the tag-bits of cache, then there is a hit and the required data word is read from cache.

    e. If there is no match, then there is a miss and the required data word is stored in main memory. It is then transferred from main

    memory to cache memory with the new tag.

    Associative mapping :

    a. An associative mapping uses an associative memory.

    b. This memory is being accessed using its contents.

    c. Each line of cache memory will accommodate the address (main memory) and the contents of that address from the main memory.

    d. That is why this memory is also called Content Addressable Memory (CAM). It allows each block of main memory to be stored

    in the cache.

    Set associative mapping :

    a. In set associative mapping, each cache location can have more than one pair of tag + data items.

    b. It combines the best of the direct mapping cache and the more flexible mapping of the fully associative cache.

    c. That is more than one pair of tag and data are residing at the same location of cache memory. If one cache location is holding two pair of tag + data items, that is called 2-way set associative mapping

    Leave a Comment