The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
49 views
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) | 49 views
0
682 ?
0
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
0
Yaa its right . Thnx for the explanation

Related questions

+1 vote
0 answers
1
asked Jan 28, 2018 in CO & Architecture by Manis Active (1.3k points) | 63 views
0 votes
1 answer
2
0 votes
0 answers
3
0 votes
0 answers
7
asked Jan 14 in CO & Architecture by Shankar Kakde (293 points) | 26 views


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

47,197 questions
51,425 answers
178,313 comments
66,727 users