Question
Let's say that we have a 4-way set associative cache. The cache has 16 sets in total. Main memory consists of 16K blocks of
Let's say that we have a 4-way set associative cache. The cache has 16 sets in total. Main memory consists of 16K blocks of 16 words each, and word addressing is used. a. Show the address format that is used to map main memory address to the cache. Include the appropriate fields and their sizes. For the remaining questions, assume that we have the following situation: We have a program that loops 6 times from location 1209810 in memory to location 1238610. In other words, think of this as an assembly language program that runs from the opcode at location 12098 to the opcode at location 12386, then loops back to location 12098. It does 6 such iterations in total (the original pass, plus 5 more loops). You can assume that the cache is initially empty. b. At the end of the first iteration, how many blocks of memory are stored in the cache? c. At the end of the first iteration, how many of these blocks are stored in (i) Set 2 (ii) Set 5 d. At the end of the first iteration, what is the hit ratio for the cache? The hit ratio should be expressed as a percentage (e.g., 85.67% or 96.35%) e. At the end of all 6 iterations, what is the hit ratio for the cache?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started