Direct Mapping

In direct mapping physical address is divided into three parts i.e., Tag bits, Cache Line Number and Byte offset. The bits in the cache line number represents the cache line in which the content is present whereas the bits in tag are the identification bits that represents which block of main memory is present in cache. The bits in the byte offset decides in which byte of the identified block the required content is present.

Tag

Number of Cache Lines

Byte Offset

Cache Line Number = Main Memory block Number % Number of Blocks in Cache

Cache Mapping Techniques

Cache mapping is a technique that is used to bring the main memory content to the cache or to identify the cache block in which the required content is present. In this article we will explore cache mapping, primary terminologies of cache mapping, cache mapping techniques I.e., direct mapping, set associative mapping, and fully associative mapping. Let’s start exploring the topic “Cache Mapping”.

Similar Reads

Primary Terminologies

Some primary terminologies related to cache mapping are listed below:...

What is Cache Mapping?

Cache mapping is the procedure in to decide in which cache line the main memory block will be mapped. In other words, the pattern used to copy the required main memory content to the specific location of cache memory is called cache mapping. The process of extracting the cache memory location and other related information in which the required content is present from the main memory address is called as cache mapping. The cache mapping is done on the collection of bytes called blocks. In the mapping, the block of main memory is moved to the line of the cache memory....

Important Points Related to Cache Mapping

Some important points related to cache mappings are listed below....

Cache Mapping Techniques

There are three types of cache mappings namely:...

Direct Mapping

In direct mapping physical address is divided into three parts i.e., Tag bits, Cache Line Number and Byte offset. The bits in the cache line number represents the cache line in which the content is present whereas the bits in tag are the identification bits that represents which block of main memory is present in cache. The bits in the byte offset decides in which byte of the identified block the required content is present....

Fully Associative Mapping

In fully associative mapping address is divided into two parts i.e., Tag bits and Byte offset. The tag bits identify that which memory block is present and bits in the byte offset field decides in which byte of the block the required content is present....

Set Associative Mapping

In set associative mapping the cache blocks are divided in sets. It divides address into three parts i.e., Tag bits, set number and byte offset. The bits in set number decides that in which set of the cache the required block is present and tag bits identify which block of the main memory is present. The bits in the byte offset field gives us the byte of the block in which the content is present....

Frequently Asked Questions on Cache Mapping – FAQs

What is Cache Memory?...