Homework #4


Most problems for this homework are from the textbook, with some small alterations made by your instructor.


1. 5.1 (page 357) (10 points)

2. 5.3 (page 357) (10 points)

3. 5.4 (page 357) (10 points)

4. 5.7 (page 358) (15 points)

5. 7.1 (page 527) (10 points). For this and subsequent problems, the string of address references is 1, 4, 8, 5, 20, 17, 4, 19, 56, 9, 11, 4, 43, 5, 6, 9

6. 7.2 (page 527) (10 points)

7. 7.3 (page 527) (10 points)

8. 7.4 (page 527) (10 points)

9. 7.5 (page 527) (10 points)


10. Use the trace files you can find at

/a/apps/Dinero/traces/benchmarks/cc1.din

on the deltas , and the dinero cache simulator to simulate several different cache organizations. Assume an instruction cache of 32 KB and a data cache of 32 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^(D0 mod 3) where D0 is the least significant digit 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. This problem is worth 50 points.


    Maximum mark: 145 (100%)