Pages

Friday, May 6, 2011

q1.d

f) Associative Mapping : If the active portions of the program and data are placed in a fast small memory to reduce the average memory access time. Such a fast small memory is referred as Cache memory. Fast access time is the feature of cache memory. Thus the process of transferring of data from main memory to cache is referred as mapping function, The Associative Mapping is used for fastest and flexible cache organization. Below figure demonstrates the associative mapping. The Associative memory stores both content (data) and address of the memory word. Let us consider that three words currently stored in the cache.

The address value of 15-bits is shown as five digit octal number and its corresponding 12-bit word as a four digit octal number. A CPU address and the associative memory is searched for matching address. If the address is found, the relevant(corresponding) 12-bit data is read and send to the CPU. If the address is not found then main memory is accessed for the word and hence address-data pair is transferred to the associative cache memory.
In case, if the cache is full and cannot hold address-data pair of main memory, a room is formed for a pair that is needed and not present in the cache. The decision about which pair should be replaced can be determined form the replacement algorithm. Whenever a new word is requested by main memory, a first-in-first-out(FIFO) replacement policy is used.