Question: 1 Background In the previous activity we learned how to use a single cache level to profile requests to the memory. Today we will learn
Background
In the previous activity we learned how to use a single cache level to profile requests to the memory. Today we
will learn two new concepts: cache levels and setassociative caches. The processor has many cache levels that are
progressively larger in size. If a row hits capacity and a block is lost, there is a chance it will still be contained in a
lower level of the cache. The general for for any cache level is this:
The input to the cache level is a request for an aligned memory address.
Go to the appropriate row, check the valid bit, and check if the tag matches.
a If the valid bit is zero, it is a miss cold start. Push the request to a lower level.
b If the tag is mismatched, it is a miss. If there are no free blocks it is a capacity miss. Push the request to
a lower level
c If the tag matches, it is a hit. Return the block in this row up to a higher level.
The levels of a cache are generally:
Level L In practice, there are two level caches, one for instructions and one for data. For our assignments
we will have a single L to keep things simple.
L
L In practice, this level is shared across multiple logical processors, but this will not come into play for our
assignments because we only work with a single logical processor.
The virtual memory.
The processor starts on level and works its way down.
nway Set Associative Cache With the last question on the last activity, we experienced a major flaw in our
directmapped cache design. You worked out an example where the cache kept juggling the block in and out of row
Each time it is a miss, this means it had to go to a lower level. The simplest way to address this is to have each
row hold multiple blocks. For example, with a directmapped cache, if you think about it in terms of a tuple:
Row, Tag, Data
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
