1

Total bits = .

  1. We have bits:
    • tag field: bits
    • block field: bits
    • offset field (word field): bits
title: Correct answers.

2

Total bits =

  1. blocks
  2. Format of address:
    • tag field: bits
    • word field: bits
  3. Anywhere, as blocks can be placed in any location of the cache.
title: Correct answers.

3

Total bits =

  1. Memory size: words Block size: words Cache size: blocks Number of sets: sets

    We have bits to work with:

    • set field: bits
    • word field: bits
    • tag field: bits

4

  1. Show main memory address format

    We have bits to work with:

    • word field: bits
    • block field: bits
    • tag field: bits
  2. Compute hit ratio for a program that loops times from locations to in memory.

    We know we have blocks in cache, and at least blocks in main memory.

    Block and block will have a clash and both go to block (for pass 1).

    Pass 2 will equal pass 3, 4, …

  3. Compute the effective access time for this program.

title: TA working

5

  1. Direct-mapped cache

    • Word field: bits
    • Block field: bits
    • Tag field: bits
  2. Associative cache

    • Word field: bits
    • Tag field: bits
  3. 4-way set associative cache

    • Set field: bits
    • Word field: bits
    • Tag field: bits
title: TA working

6

In a direct-mapped cache, there is only one location we can write to so the victim block is already decided.

title: Correct answer.