Question
Ques: Consider a memory of 32 blocks (labeled 0 through 31) and a cache of 8 blocks (labeled 0 through 7). In the questions below,
Ques: Consider a memory of 32 blocks (labeled 0 through 31) and a cache of 8 blocks (labeled 0 through 7). In the questions below, list only correct results:
a. Under direct mapping, which blocks of memory contend for block 2 of the cache?
b. Under 4-way set associativity, to which blocks of cache may element 31 of memory go?
c. In the following sequence of memory block references from the CPU, beginning from an empty cache, on which reference must the cache layout for a direct mapped and a 4-way set associative cache first differ?
Order of reference | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---|---|---|---|---|---|---|---|---|
Block referenced | 0 | 15 | 18 | 5 | 1 | 13 | 15 | 26 |
d. Suppose a direct-mapped cache is equipped with a single-block victim cache. Out of the following sequence of memory block references from the CPU (R denotes read (or load) and W denotes write (or store)), on which references is the block retrieved from the victim cache? If no block is ever thus retrieved, so state. Show your reasoning.
Order of reference | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Type of reference | R | R | W | R | R | W | R | R | W | R | R | W |
0 | 15 | 18 | 5 | 1 | 13 | 15 | 26 | 6 | 6 | 15 | 3 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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