Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Cache: This is actually a long question that has been broken into small chunks... Consider a direct-mapped cache that has 4 lines, each containing 1
Cache:
This is actually a long question that has been broken into small chunks...
Consider a direct-mapped cache that has 4 lines, each containing 1 4-byte word. Assume that the cache has a hit access time of 1 ns and a miss penalty of 50 ns (ie., the full access time is 51 ns when there is a miss: the miss penalty * the usual access time). What is the average memory access time for the following program fragment, assuming that none of the instructions are in the cache to begin with? Consider a direct-mapped cache that has 8 lines, each containing 1 word. For simplicity, assume that a word is 2 bytes long, which means that addresses are also 2 bytes. Are any address bits used to determine the byte within the cache line? If so. how many? Which address bits indicate the line to which that address maps? How many bits are needed for the tag? Consider the following set of memory address requests. How many of the requests would be hits and how many misses, assuming that the cache is empty beforehand? What would be the final contents of the cache? Assume that these 5 data requests are in a loop, and so will be repeated many times in a row. What will the hit rate converge to for this set of requests? The tables below represent an 8-line, 2-way associative cache, a 4-line, 2-way associative cache, and a 4-line, fully associative cache. (Fully associative means that all the lines in the cache are part of a single, large set.) Show the final contents of each cache after 1 iteration of the 5 address requests above, assuming an LRU replacement policy. What would the hit ratio converge to for each cache, assuming that the 5 address requests are in a loop, and so will be repeated many times in a row? Now assume that we have a direct-mapped cache with 4 lines, each of which contains 4 two-byte words. In one iteration of the same 5 address requests used in the previous exercises, which requests would be hits and which would be misses, assuming that the cache is empty beforehand? What would be the final contents of the cache after that 1 iteration? (Put a "v" in any word in the cache that is valid but the information you've been given isn't enough to know what the value should be.) Assuming that the 5 data requests are in a loop, what does the hit rate converge to for this set of requests? Which of the exercises above illustrate the effects of spatial locality? Which exhibit the effects of temporal localityStep 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