GATE / CS ARCHIVE

GATE CSE 2016 SET 2 / QUESTION 32

GATE CSE 2016 Set 2 Q32

Computer Organization & Architecture · Cache Memory · Full GATE CSE 2016 Set 2 paper

GATE 2016 Set 2, Q32 2 marks · NAT
Report issue

Cache Memory

Question 32, GATE 2016: A machine’s physical addresses have 40 bits. Find tag width in a 512 KB, 8-way set-associative cache under the usual byte-addressed binary-capacity convention.
Tap to enlarge
Answer & solution

Official answer: 24.0 : 24.0

Our answer: 24

Step through it (4 steps)

For byte-addressed memory and binary KB, cache capacity 512 KiB=219 bytes with 8 ways gives 216 bytes per way. Index plus block-offset bits total 16 regardless of block size, leaving 40−16=24 tag bits. The usual power-of-two cache and byte-address convention is assumed.

Let a block contain 2b bytes. The number of cache sets is 219/(2³×2b)=216−b. Therefore the address has b offset bits and 16−b index bits; their sum is fixed even though block size is unstated. The remaining high 24 bits distinguish memory blocks mapping to the same set.

Original paper, page 33 · Answer key