The system from which this memory dump was produced contains 4 blocks of cache, where each block consists of 8 bytes. Assume that the following sequence of memory addresses takes place: 0x2C, 0x6D, 0x86, 0x29, 0xA5, 0x82, 0xA7, 0x68, 0x80, and 0x2B. a) How many blocks of main memory are there? b) Assuming a direct mapped cache: i. Show the format for a main memory address assuming that the system uses direct mapped cache. Specify field names and sizes. ii. What does cache look like after the 10 memory accesses have taken place? Draw the cache and show contents and tags. iii. What is the hit rate for this cache on the given sequence of memory accesses?
The system from which this memory dump was produced contains 4 blocks of cache, where each
block consists of 8 bytes. Assume that the following sequence of memory addresses takes place:
0x2C, 0x6D, 0x86, 0x29, 0xA5, 0x82, 0xA7, 0x68, 0x80, and 0x2B.
a) How many blocks of main memory are there?
b) Assuming a direct mapped cache:
i. Show the format for a main memory address assuming that the system uses direct mapped
cache. Specify field names and sizes.
ii. What does cache look like after the 10 memory accesses have taken place? Draw the cache
and show contents and tags.
iii. What is the hit rate for this cache on the given sequence of memory accesses?
c) Assuming a fully associative cache:
i. Show the format for a main memory address. Specify field names and sizes.
ii. Assuming that all cache blocks are initially empty, blocks are loaded into the first available
empty cache location, and cache uses a first-in, first-out replacement policy, what does cache
look like after the 10 memory accesses have taken place?
iii. What is the hit rate for this cache on the given sequences of memory accesses?
d) Assuming a 2-way set associative cache:
i. Show the format for a main memory address. Specify field names and sizes.
ii. What does cache look like after the 10 memory accesses have taken place?
iii. What is the hit ratio for this cache on the given sequence of memory accesses? iv. If a cache
hit retrieves a value in 5ns, and retrieving a value from main memory requires 25ns, what is
the average effective access time for this cache, assuming that all memory accesses exhibit
the same hit rate as the sequence of 10 given, and assuming that the system uses a
nonoverlapped (sequential) access strategy
A direct mapped cache consists of 8 blocks. Byte-addressable main memory contains 4K blocks of
8 bytes each. Access time for the cache is 22ns, and the time required to fill a cache slot from main
memory is 300ns. (This time allows us to determine that the block is missing and bring it into
cache.) Assume that a request is always started in parallel to both cache and to main memory (so if
it is not found in cache, we do not have to add this cache search time to the memory access). If a
block is missing from cache, the entire block is brought into the cache and the access is restarted.
Initially, the cache is empty.
a) Show the main memory address format that allows us to map addresses from main memory to
cache. Be sure to include the fields as well as their sizes.
b) Compute the hit ratio for a program that loops 4 times from addresses 0x0 to 0x43 in memory.
c) Compute the effective access time for this program
Consider a byte-addressable computer with 24-bit addresses, a cache capable of storing a total of
64KB of data, and blocks of 32 bytes. Show the format of a 24-bit memory address for:
a) direct mapped
b) associative
c) 4-way set associative


Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 4 images









