retagged by
815 views
4 votes
4 votes

Consider a computer with a 4-ways set-associative mapped cache of the following characteristics: a total of 256 MB of main memory, a word size of 1 byte, a line size of 128 words and a cache size of 512 KB.
While accessing the memory location FC23CDEH by the CPU, then the value of  [(((TAG)10)217 mod 17)/6]217   ,where TAG field is the content  of the corresponding cache line.

(a) 3

(b) 0

(c) 1

(d) 2

retagged by

1 Answer

Best answer
1 votes
1 votes

Cache size 512 KB 

Block size:128 words 

Number of Block= 4K

Number of sets= 1K

Main memory address= 28 bits 

Word=7 bit

Set = 10 bit

Tag= 28-10-7=11bit

Tag=11 Set=10 Word=7

Value of Tag is $\left ( 11111100001 \right )_{2}=\left ( 2017 \right )_{10}$

$\left ( \left ( \left ( 2017 \right )^{217}mod17 \right )/6 \right )^{217}$

$2017^{217}mod17=6$

https://www.mtholyoke.edu/courses/quenell/s2003/ma139/js/powermod.html

$(6/6)^{2017}=1$

selected by

No related questions found