Homework #4

Most problems for this homework are from the textbook.

Submit your work work on the Blackboard before midnight the day the homework is due. Failure to do so will result in late penalties, see the syllabus for grading detail.

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-4.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 5.3 550 90
2 5.10 557 65
3 5.11 559 50
4 See below (Using a cache simulator)   95
Maximum mark (100%) 300

(*) Using a cache simulator

In this problem you'll use a cache simulator to simulate various cache organizations, using references from a real applicatioon. Assume a 32 KB data cache and a 32 KB instruction cache, both with the same organization.

You should choose at least two different associativity levels, and two different block sizes, as described below. This means you'll have to include in your submission four sets of results: for each associativity level and each block size you'll report:

  • The command you ran
  • Miss rate and the 3C breakdown for the instruction cache
  • Miss rate and the 3C breakdown for the data cache

The trace file to use for this problem can be found at gcc.din. The format of the file is described in the dinero documentation.

(i) the associativity will be calculated as follows:

N = StudentID mod 4

if ( N == 0) associativity = 1 /* 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

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

$Id: hw4.html,v 1.1 2011/09/06 14:55:05 virgil Exp $