GATE | GATE-CS-2007 | Question 10
Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bit address of a word in main memory. The number of bits in the TAG, LINE and WORD fields arerespectively:
(B) 7, 7, 6
(C) 7, 5, 8
(D) 9, 5, 6
Here the number of sets = 128/4 = 32 (as it is 4 say set associative) We have total 64 words then we need 6 bits to identify the word So the line offset is 5 bits and the word offset is 6 bits and the TAG = 20-(5+6) =9 bits so it should be 9,5,6
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.