Choosing Which Block to Replace


Caches use various strategies for choosing which block to replace: Size of Tags versus Set Associativity
Increasing associativity requires more comparators and more tag bits per cache block. Assuming a cache of 4096 blocks, a 4-word block size, and a 32-bit address, find the total number of sets and the total number of tag bits:
Direct-mapped cache  

Two-way set-associative cache  

Four-way set-associative cache  

Fully associative cache  



      My wife apologized for the first time ever today!    
      She said she’s sorry she ever married me.