hw2-sol - HOMEWORK #2 - SOLUTION ECE 4750/CS 4420 Computer...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
HOMEWORK #2 - SOLUTION ECE 4750/CS 4420 – Computer Architecture Problem 2.1 Advanced Memory Hierarchy [25 points] (a) offset bits = log 2 line size. index bits = number of sets. tag is everything else. 11 10 9 8 7 6 5 4 3 2 1 0 C a c h e D : C a c h e F : tag index offset tag offset (b) (c) Part b) Part c) line in cache line Cache D Address L0 L1 L2 L3 hit? VC VC hit? 0x110 inv 11 inv inv no inv no 0x101 10 no no 0x123 12 no no 0x201 20 no 10 no 0x15C 15 no 11 no 0x102 10 no 20 no 0x136 13 no no 0x202 20 no 10 yes 0x137 yes no 0x124 yes no 0x103 10 no 20 yes 0x15D yes no 0x203
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Part (b) Part (c) line in cache line Cache F Address L0 L1 L2 L3 hit? VC VC hit? 0x110 11 inv inv inv no inv no 0x101 10 no no 0x123 12 no no 0x201 20 no no 0x15C 15 no 11 no 0x102 yes no 0x136 13 no 12 no 0x202 yes no 0x137 yes no 0x124 12 no 15 yes 0x103 yes no 0x15D 15 no 20 yes 0x203 20 no 13 yes Cache F Cache F with Victim Cache Total Misses 9 6 Total Cycles 274 190 (d) A 5 line fully associative cache using LRU replacement scheme is identical in hit rate to cache F with the victim cache. For any stream of references, the VC line is always the same line as the LRU line in the 5 line cache. The VC line is the line that always gets evicted from the combined cache. This is the same as the LRU line in the 5 line cache. However, since the victim cache has a higher hit latency, cache F with victim cache has higher average access time. The average access times for the 5 line cache and the victim cache are 14.385 cycles per access and 14.615 cycles per access, respectively. (e) Virtually indexed Physically indexed Direct-mapped L3 L1 L3 Problem 2.2 Virtual Memory [20 points] Assume all memory addresses are word aligned. (a) 1) Yes, if R3 = R4 2) Never. R3 not equal R3+4
Background image of page 2
3) Never. R3 not equal R3+4096 (b) 1) PA(R3) = PA(R4) 2) Never. They have different page offset 3) PA(R3) = PA(R3+4096) i.e. the two consecutive virtual pages are mapped to the same physical page (c) A 16-bit address is divided into the following three parts. 15
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

hw2-sol - HOMEWORK #2 - SOLUTION ECE 4750/CS 4420 Computer...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online