3 MAPPING TECHNIQUES
WHAT IS MAPPING? We need to bring data from the main memory to the cache for reducing the access time for the CPU as the cache is closer to the CPU than the main memory. ASSOCIATIVE MAPPING Data from main memory are placed randomly in cache.Let us say we have 16 bit memory address then out of that we have 12 bit tag bits & 4 bit word bits .That is cache will have total 2^12 blocks and each block will have 2^4 data words.if get 1111111111111111 then tag bits is 111111111111 & word bits is 1111,that is we will look for block with tage of 111111111111 and in that block we will search for 16th word block.refer the figure => benefits of associative mapping are like No thrashing as it happens in direct mapping DIRECT MAPPING Same like above , if we use 16 bit addressing then tag bits have 5 bits,block bits of 7bits & word bits have 4 bits .Word bit identifies the column number,block bit identifies the row number & tag bits refers the corresponding address
Comments
Post a Comment