Homework #6

Problems for this homework are from the textbook.

Submit your work work on the Blackboard before midnight the day the homework is due. Here are the requirements for your Blackboard submission:

• Attach the assignment as a compressed archive file (.zip, .tgz, .tbz2, .rar)
• The name of the file should be: firstName-lastName-HW-assignmentNumber.extension (e.g. Jane-Doe-HW-6.zip)
• Include your e-mail address in the Comment field when submitting the assignment through the Digital Drop Box
• If for any reason you are submitting the assignment more than once, indicate this in the Comment field by including the word COMPLEMENT

 Problem Page Points 1 7.4 556 10 2 7.10 556 10 3 7.14 557 10 4 7.16 557 15 5 7.21* (see note below) 557 90 6 7.28 558 5 7 7.35 559 10 8 7.39 559 15 9 7.41 560 10 Maximum mark (100%) 175

(*) Problem 7.21

GCC trace file to use for this problem can be found at gcc.din

Please make sure you clearly state your student ID (StudentID) on the first page of your write-up.

(i) the associativity will be calculated as follows:

```N = StudentID mod 4

if ( N == 0) associativity = 0 /* direct mapped cache */
if ( N == 1) associativity = 2 /* 2-way set-associative cache */
if ( N == 2) associativity = 4 /* 4-way set-associative cache */
else associtivity = MAX        /* fully-associative cache */
```
For the 2nd associativity level do:
```N = (N + 1) mod 4
```
then calculate the associativity using the same formula used to calculate the first associativity.

(ii) the block size will be calculated as follows:
```K = StudentID mod 6
blockSize = 2^K words
```
For the 2nd block size do:
```K = (K + 3) mod 6
blockSize = 2^K words
```

 Last update: Aug 31, 2008 Virgil Bistriceanu cs470 Computer Science

\$Id: hw6.html,v 1.2 2008/08/31 18:06:20 virgil Exp \$