CS 220 - Cache Problems

Problem 1

Do problem 5.3.1 from the book. The list of addresses given in the problem are word addresses and in are decimal (not hexadecimal). They are not byte addresses. For example, for problem 5.3.1a the first address given is 3. This corresponds to byte address 12ten or 1100 (note the two final zeros). So you don't need to chop off the two zeroes on the least significant bits because the book has already done it for you. To get you started:

  Addressten   Binarytwo    Tagten     Blockten   Hit/Miss
  3            11          0          3         Miss
  180          10110100    11         4         Miss
  fill in the rest

Problem 2

Do problem 5.3.2a the same exercise as above but for a direct mapped cache with two-word blocks and a total of 8 blocks.

Problem 3

Using the same set of addresses from the above exercises identify whether the access is a hit or miss for an 8 block (one word per block) fully associative cache. Assume LRU replacement policy.

Problem 4

Using the same set of addresses from the above exercises identify the set and whether the access is a hit or miss for a 2-way set associative cache that has 16 one word blocks (hence 8 sets). Assume LRU replacement policy.

Problem 5

Do problems 5.4.1 - 5.4.3 part a only.