Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
446 views
in Computer by (101k points)
closed by
Consider a set-associative cache of size 2 KB (1 KB = 210 bytes) with cache block size of 64 bytes. Assume that the cache is byte-addressable and a 32-bit address is used for accessing the cache. If the width of the tag field is 22 bits, the associativity of the cache is _______

1 Answer

0 votes
by (102k points)
selected by
 
Best answer

Data:

Main memory size (MM) = 232 B (32 bit address)

Cache Memory Size (CS) = 2 KB = 211 B

Block Size (BO) = 64 B = 2

Tag = 22 bits

Set Associative Mapped Cache:

let 2x - way set associative mapping

\(number~of~lines=\frac{{{2}^{11}}}{{{2}^{6}}}={{2}^{5}}\)

\(number~of~sets=\frac{{{2}^{5}}}{2^x}={{2}^{5-x}}\)

Formula: To find number of bits in tag in set associative mapping

MM = tag + set + BO

32 = 22 + 5 - x + 6

∴ x = 1

Therefore it is 21 - way set associative mapping

The associativity of the cache is 2.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...