Explore BrainMass

# Direct-mapped cache, Fully-associative cache

Not what you're looking for? Search our solutions OR ask your own Custom question.

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

1. A computer using direct-mapped cache has 2^24 words of main memory and a cache of 256 blocks. Each cache block contains 64 words.

a) How many blocks of main memory are there?
b) What is the format of a memory address as seen by the cache? (What are the sizes of the tag, block and word fields?)
c) To which block will the memory reference 01BD36 (in hexadecimal) map?

2. A computer using fully-associative cache has 2^32 words of main memory and a cache of 1024 blocks. Each cache block contains 32 words.

a) How many blocks of main memory are there?
b) What is the format of a memory address as seen by the cache? (What are the sizes of the tag, block and word fields?)
c) To which block will the memory reference 025A13CF (in hexadecimal) map?

https://brainmass.com/computer-science/memory/direct-mapped-cache-fully-associative-cache-377939

#### Solution Preview

1. Size of main memory (Sm) = 2^24 words
Size of direct-mapped cache (Nb) = 256 blocks or 2^8 blocks
Size of a cache block (Scb) = 64 words or 2^6 words

(a) So, total number of blocks of main memory = Sm / Scb = 2^24 / 2^6 = 2^18 blocks

(b) From the given information,
size of word field = 6 bits
size of block field = 8 bits
size of tag field = 24 - 8 - 6 = 10 bits

So, the format of a memory address as seen by the cache will be ...

#### Solution Summary

In fully-associative cache it is one big set comprising of all the cache blocks. To which cache block will a memory block map to, can not be determined unless ... .

\$2.49