Homework 0 is due on Thursday 1/25/02. This is not counted toward
your final grade. It is a review on prerequisite topics. You
should still turn in the homework to familiarize yourself with the homework
turn in procedure.
WAR
add r4, r1, r5 #1: r1 + r5 -> r4
The WAR data hazard is between instruction 1 and 2.
add r1, r3, r5 #2: r3 + r5 -> r1
The second instruction writes to register 1 after the first
instruction reads it.
RAW
add r1, r2, r3 #1: r2 + r3 -> r1
The RAW data hazard is between instruction 1 and 2.
add r4, r1, r5 #2: r1 + r5 -> r4
The second instruction reads register 1 after the first
instruction writes to it.
Compulsory
Capacity
Conflict
solution:
The table describes how increasing block size, associativity, and overall
size affects each type of misses in cache.
Cache miss type | Description | Block size | Associativity | Overall Size |
Compulsory | misses occurred when the starting cache is empty | decrease
This increases the amount of prefetch, therefore decreases initial misses needed to fill up the cache with relevant entries. |
no affect | no affect |
Capacity | misses occurred when the cache is too small to contain the working set of memory access | no affect | no affect | decrease |
Conflict | misses occurred when multiple memory entries are mapped to the same cache entry due to cache mapping algorithm. | increase
The cache will contain less blocks. This increases mapping conflicts for far away memory entries. |
decrease
this increases the number of cache entries available to the same memory entry, therefore give rise to less misses due to mapping conflict |
no affect |