Given a byte-addressable memory with 256 bytes, suppose a memory dump yields the results shown below. The

Question:

Given a byte-addressable memory with 256 bytes, suppose a memory dump yields the results shown below. The address of each memory cell is determined by its row and column. For example, memory address 0x97 is in the 9th row, 7th column, and contains the hexadecimal value 43. Memory location 0xA3 contains the hexadecimal value 58

0 1 2 3 4 5 6 7 8 9 A B C D E F 0 DC D5 9C 77 C1 99 90 AC 33 D1 37 74 B5 82 38 EO 1 86 E5 2 49 E2 23 FD DO A6

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?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: