Answer to Question #262087 in Computer Networks for pihu

Question #262087

A computer has 16 MB RAM with each memory word of 32 bits. It has cache memory having 512 blocks having a size of 128 bits (4 memory words). Show how the main memory address (CA30FB)h  will be mapped to cache address, if

(i) Direct cache mapping is used

(ii) Associative cache mapping is used

(iii)Two way set associative cache mapping is used.

You should show the size of tag, index, main memory block address and offset in your answer.

1
Expert's answer
2021-11-07T17:18:10-0500

Main memory size =16 MB"=2^{16}B"

Cache memory size"=128B=2^{7}B"

Block size "=512" block"=2^{9}"

Number of sets"=2^9\/2^2=2^7"

Here 7 would be the required for index

Number of bits for tag=256

Blocks can be anywhere in the cache.

Size of cache =7

Location of block 12 in cache = 12 mod 8=4

Number of blocks in set =2

Number of sets =256

Number of bits for tag =24-(7+8)=9



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS