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”.