Caches are important to providing a high-performance memory hierarchy to process
ID: 3917465 • Letter: C
Question
Caches are important to providing a high-performance memory hierarchy to processors. Below is a list of 32-bit memory address references, given as word addresses.
42, 137, 66, 50, 38, 225, 173, 22, 19, 88, 130, 43
a, For each of these references, identify the binary address, the tag, and the index given a direct-mapped cache with 16 one-word blocks. Also list if each reference is a hit or a miss, assuming the cache is initially empty
b, For each of these references, identify the binary address, the tag, and the index given a direct-mapped cache with two-word blocks and a total size of 8 blocks. Also list if each reference is a hit or a miss, assuming the cache is initially empty
Explanation / Answer
SOLUTION : (a):- Direct-mapped cache with 16 one-word blocks is given that means 16 blocks cache so 4 bits are required for index and remaining bits are for tag.
SOLUTION : (b):- Direct-mapped cache with two-word blocks and a total size of 8 blocks is given that means 1 bit for word offtset, 3 bits are required for index and remaining bits are for tag.
==========================================================================
word address binary address tag index Hit / Miss 42 0010 1010 2 10 Miss 137 1000 1001 8 9 Miss 66 0100 0010 4 2 Miss 50 0011 0010 3 2 Miss 38 0010 0110 2 6 Miss 225 1110 0001 14 1 Miss 173 1010 1101 10 13 Miss 22 0001 0110 1 6 Miss 19 0001 0011 1 3 Miss 88 0101 1000 5 8 Miss 130 1000 0010 8 2 Miss 43 0010 1011 2 11 Miss