### Homework #5

Most problems for this homework are from the textbook, with some changes made by your instructor. For all problems in chapter 7 you will use the following string of address references:
```    1, 4, 8, 5, 20, 17, 4, 19, 51, 9, 11, 4, 41, 5, 6, 9
```

 . Problem Page Points 1 5.1 357 10 2 5.3 357 10 3 5.4 357 10 4 5.7 358 20 5 7.1 527 10 6 7.2 527 10 7 7.3 527 10 8 7.4 527 10 9 7.5 527 10 10 See below . 50 Maximum mark (100%) 140

10. Use the trace file for the SPICE circuit simulator

```    /a/apps/Dinero/traces/benchmarks/spice.din
```

on the deltas , and the dinero cache simulator to simulate several different cache organizations. Assume an instruction cache of 64 KB and a data cache of 64 KB using the same organization.

You will run the simulator with two different associativities and two different block sizes (there will be four different configurations). Use the following formulae to find out what associativity and block sizes you use:

• first_associativity = 2^(D1D0 mod 3) where D1D0 represent the least significant two digits of your SSN
• second_associativity = 2*first_associativity
• first block size = 2^((D1 mod 3) + 2) bytes, where D1 is the digit next to the least significant of your SSN
• second block size = 2^((D2 mod 3) + 2) bytes, if D2 and D1 are different, otherwise it's two times the first block size

For each cache you simulate, you will find the hit rate. For the cache organization with the best hit rate draw a diagram like that in figure 7.27 in your textbook.