Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
The microprocessor cache has a set of flag bits. We have used only one so far, the valid bit which indicates if a row is
The microprocessor cache has a set of flag bits. We have used only one so far, the valid bit which indicates if a row is in use. There are other bits: Least recently used bitsLRU Some bits used as meta data to determine which is the oldest block in the row. This determine which block gets evicted during a capacity miss. Dirty bit. In multilevel caches, the dirty bit indicates if the current cache level has a modified version of a block that is inconsistent with lower cache levels and the virtual memory Here is an example of a way set associative cache with the flag bits described above: Row Tag v d LRU Data Tag v d LRU Data In this assignment we will distinguish between load and store operations. Store operations introduce a complication: if a change is made to a block how do you update all levels of cache and the virtual memory The simplest approach is called writethrough, where on a store operation the entire processor stalls as the block is copied into the L L etc. and the virtual memory. This costs as much time as a hit, and is suboptimal. Instead, modern microprocessors use a technique called writeback. When a block is written, you only change the value in the L cache, and set the dirty bit. The change is not copied into the L or virtual memory. This means that with writeback, values written to memory are inconsistent across all cache levels and the virtual memory If a block with a dirty bit is evicted from a row the change is pushed down one level below. The value is updated in the lower level making it consistent, and setting the dirty bit in the lower level. For example, if you initialize i this change is only written to the level one cachethe value of i is garbage or unknown in all other cache levels and the virtual memory. If somehow the block containing the concept of i is evicted from the level one cache due to a capacity miss we note that its dirty bit was set during the store operation. Then, the concept of i is pushed to the level two cache but not any lower and the dirty bit is set. If again, the concept of i gets evicted from the level two cache the process repeats. The change is pushed to a lower level. This created an unusual phenomenon where variables in primary storage virtual memory are totally different than the values the processor is using. At a glance, you can see that this would resolve the issue from the last problem of the last activity, you would not need to juggle the values in row it could hold both values. Real numbers for set associativity range from to Direct Instruction The instructor will review these examples in class: A system has two cache levels. The L cache has rows. The L cache has rows. Both caches are twoway set associative and the block size is bytes. Ignore the LRU bit. You must use writeback methodology. Profile the following memory requests to the cache: a Store i to b Store j to c Store i to d Store k to Activity A system has two cache levels. The L cache has rows. The L cache has rows. Both caches are way set associative and the block size is bytes. Profile the following memory requests to the cache: a Write i to b b Write j to b c Write k to b d Write l to b e Write m to b f Write n to b g Write o to b h Write p to b Ignore the LRU bit, and profile these requests with writeback methodology. Assume the virtual memory has garbage values for these variables to start. What are the final values of each variable in each cache level?
The microprocessor cache has a set of flag bits. We have used only one so far, the valid bit which
indicates if a row is in use. There are other bits:
Least recently used bitsLRU Some bits used as meta data to determine which is the
oldest block in the row. This determine which block gets evicted during a capacity miss.
Dirty bit. In multilevel caches, the dirty bit indicates if the current cache level has a modified
version of a block that is inconsistent with lower cache levels and the virtual memory
Here is an example of a way set associative cache with the flag bits described above:
Row Tag v d LRU Data Tag v d LRU Data
In this assignment we will distinguish between load and store operations. Store operations
introduce a complication: if a change is made to a block how do you update all levels of cache and
the virtual memory The simplest approach is called writethrough, where on a store operation
the entire processor stalls as the block is copied into the L L etc. and the virtual memory. This
costs as much time as a hit, and is suboptimal.
Instead, modern microprocessors use a technique called writeback. When a block is written,
you only change the value in the L cache, and set the dirty bit. The change is not copied into the
L or virtual memory. This means that with writeback, values written to memory are inconsistent
across all cache levels and the virtual memory If a block with a dirty bit is evicted from a row the
change is pushed down one level below. The value is updated in the lower level making it consistent,
and setting the dirty bit in the lower level.
For example, if you initialize i this change is only written to the level one cachethe value
of i is garbage or unknown in all other cache levels and the virtual memory. If somehow the block
containing the concept of i is evicted from the level one cache due to a capacity miss we note
that its dirty bit was set during the store operation. Then, the concept of i is pushed to the level
two cache but not any lower and the dirty bit is set. If again, the concept of i gets evicted from the level two cache the process repeats. The change is pushed to a lower level. This created
an unusual phenomenon where variables in primary storage virtual memory are totally different
than the values the processor is using.
At a glance, you can see that this would resolve the issue from the last problem of the last
activity, you would not need to juggle the values in row it could hold both values. Real numbers
for set associativity range from to
Direct Instruction
The instructor will review these examples in class:
A system has two cache levels. The L cache has rows. The L cache has rows. Both
caches are twoway set associative and the block size is bytes. Ignore the LRU bit. You
must use writeback methodology. Profile the following memory requests to the cache:
a Store i to
b Store j to
c Store i to
d Store k to
Activity
A system has two cache levels. The L cache has rows. The L cache has rows. Both
caches are way set associative and the block size is bytes. Profile the following memory
requests to the cache:
a Write i to b
b Write j to b
c Write k to b
d Write l to b
e Write m to b
f Write n to b
g Write o to b
h Write p to b
Ignore the LRU bit, and profile these requests with writeback methodology. Assume the
virtual memory has garbage values for these variables to start.
What are the final values of each variable in each cache level?
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