0
3.4kviews
What are the various techniques for data transformation from main memory to Cache Memory

What are the various techniques for data transformation from main memory to Cache Memory

1 Answer
0
152views


The transformation of data from main memory to cache memory is called mapping. There are 3 main types of mapping:

  1. Associative Mapping
  2. Direct Mapping
  3. Set Associative Mapping



Associative Mapping :-

The associative memory stores both address and data. The address value of 15 bits is 5 digit octal numbers and data is of 12 bits word in 4 digit octal number. A CPU address of 15 bits is placed in argument register and the associative memory is searched for matching address.



Direct Mapping :-

The CPU address of 15 bits is divided into 2 fields. In this the 9 least significant bits constitute the index field and the remaining 6 bits constitute the tag field. The number of bits in index field is equal to the number of address bits required to access cache memory.




Set Associative Mapping :-

The disadvantage of direct mapping is that two words with same index address can't reside in cache memory at the same time. This problem can be overcome by set associative mapping.

In this we can store two or more words of memory under the same index address. Each data word is stored together with its tag and this forms a set.

Please log in to add an answer.