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

Note: For this homework assume the main memory has 16 addresses such that addres

ID: 3585385 • Letter: N

Question

Note: For this homework assume the main memory has 16 addresses such that address I has data Di, where 0 <= i <= 15

Question 3. [30 points]

For a processor having two caches, a level 1 cache (i.e., L1 cache) which is direct-mapped; and a level 2 cache (i.e., L2 cache), which is 2-way set associative, show the placement in the caches and hit/miss for each of the following address requests. You must show the tag and index for each.

0, 4, 12, 0, 2, 3, 6, 13, 1, 15, 8, 0, 2, 3, 15

Assume warm cache start with the following cache status: (Note: the index and tag field are left blank on purpose) and also assume addresses are real Tag Data D8 Index Tag Data D8 D6 D11 D2 D3 D6 D11 L1 L2

Explanation / Answer

Direct Mapped Cache:

Memory address(given): 0,4,12,0,2,3,6,13,1,15,8,0,2,3,15

Memory block No: Memory address/Block size:

0,1,3,0,0,0,1,3,0,3,2,0,0,0,3

Cache block no: Memory block no%No of blocks in cache:

0,1,3,0,0,0,1,3,0,3,2,0,0,0,3

Placement in cache

Miss/hits

Miss rate = 4/15 Hit rate= 11/15

(b) 2-way set associative cache:

Placement in cache

Miss/Hit rate (Comes out to be same as Direct Mapped):

Miss rate: 4/15 Hit rate:11/15

Here, hit.miss rate of both the caches comes out to be same but it is not the case always.

Block position Cache block no 0 0 1 1 2 2 3 3
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote