edited by
1,516 views
4 votes
4 votes
Consider a n-way cache with 'x blocks of 64 words each. The main memory of the system is having 8 million words. Size of the tag field is 16 bits and additional memory required for tags is 1024 bytes. What will be the values of n and x respectively?

Answer 256 512
edited by

1 Answer

Best answer
7 votes
7 votes
Memory required for tags = no. of blocks * tag size

1024B = x * 16-bit

x = 512

Main memory size : 2^23 words can be represented in 23 bits

Tag + Set + Word = 23 bit

16 + Set + 6 = 23-bit

Set = 1bit

No. of sets = 2

n = No.of blocks / No. of sets = 512 / 2 = 256

(x,n) = (512,256)
selected by

Related questions

0 votes
0 votes
1 answer
2
0 votes
0 votes
1 answer
3