Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Cache(only answer questions 4, 5, and 6) The following 2-way set-associative cac

ID: 3686282 • Letter: C

Question


Cache(only answer questions 4, 5, and 6)

The following 2-way set-associative cache consists of four sets. Main memory contains 64K blocks of 64 bytes each. Line 0Line 1 Set 0 Set1 Set 2 Set 3 1059 34A 991 71D 1118 2FFO 1058 4A 1. How many lines are in the cache? 2. How many bits are in an address? 3. Show the main memory address format that allows us to map addresses from main memory to cache. Be sure to include the fields as well as their sizes. 4. Given the address Ox4AE7, which set does it map to? Is it in the cache? If so, in which line of 5. Given the address 0x105928, which set does it map the set? Given the address 0x105928, which set does it map to? Is it in the cache? If so, in which line of the set? s. Given the address OscAB6, 6. Given the address OxCAB6, which set does it map to? Is it in the cache? If so, in which line of the set?

Explanation / Answer

4. The Address 0x4AE7 has an offset address of 10 0111 (according to the address of the block) and set 11, also with a tag of 100 1010. this maps to the set 3, by seeing the tags of the tags in the set 3, we can say that is in the line 1.(which means this is in cache)

5. Address 0x10592B has an offset 10 1011, which has an offset address as 00, and the tags 1 0000 0101 1001. Which clearly shows that, it is in a block which maps to the set 0. Also by seeing the tags in the set 0, we can say that, this block is in the line 0. (which means this is in cache)

6.The address 0xCA86 has an offset address 00 1001, set 10 which has tags 1100 1010. This address is in a block where it maps to set 2. By actually seeing them clear in set 2, we cannot see the block CA in the line. Which clearly shows that it is not in the cache.