The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes
The cache can hold 64 KB .data is transferred between main memory and cache in blocks of 4 bytes each.the main memory consist of 16 M Bytes . if the cache memory is 16-way set associative,Then the hexa decimal main memory address AAAAAA is mapped into which cache set?
asked in CO & Architecture by (25 points)
edited by | 72 views
682 ?
ya it is 682

1 Answer

+2 votes
The cache memory size is 64KB i.e 2^16Bytes.Block size =4bytes

No of lines in cache=2^16/2^2=2^14

The cache is 16 way set associative. So the no of sets is : size of cache/size of sets=2^14/16=2^(14-4)=2^10.

So whenever a particular main memory cell has to be mapped to cache it would be mapped to the set for %2^10. that means that for cache block no we need the last 10 bits of the main memory address.

for main memory : address is of 22 bits and 2 bits are for block offset

So the address given to us is AAAAAA . In Binary it is 1010 1010 1010 1010 1010 1010..

2 bits are for the block offset So address is :

1010 1010 1010 1010 1010 10.

As we require last 10 bits for the purpose of mapping we get :10 1010 1010 i.e=682.

Correct me if I am wrong..
answered by Loyal (5.4k points)
edited by
Yaa its right . Thnx for the explanation

Related questions

+1 vote
0 answers
+2 votes
1 answer
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
48,515 questions
52,763 answers
68,234 users