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
248 views
in Computer by (106k points)
closed by

An 8 KB direct-mapped write-back cache is organized as multiple blocks, each of size 32-bytes. The processor generates 32-bit addresses. The cache controller maintains the tag information for each cache block comprising of the following.

1 Valid bit

1 Modified bit

As many bits as the minimum needed to identify the memory block mapped in the cache.

What is the total size of memory needed at the cache controller to store meta-data (tags) for the cache?


1. 4864 bits
2. 6144 bits
3. 6656 bits
4. 5376 bits

1 Answer

0 votes
by (106k points)
selected by
 
Best answer
Correct Answer - Option 4 : 5376 bits

The correct answer is option 4

Data:

Main Memory size =232 Byte

Cache size = 8KB = 213 Byte

Block size = 2Byte

Valid = 1 bit

Modified = 1 bit

Formula:cachesizeblockscachesizeblocksizetotallinesl

number of bits = ⌈log2 n⌉ 

Number of lines in cache = \(\frac{cache\;size}{block\;size}\)totallineslinesinaset

MM = tag + index + block offset .....(in bits)

Total bits required to store meta-data of 1 line =  Valid bit +  Modified bit + tag bit

Calculation:

Number of cache lines =\({{Cache}\ {size} \over block\ size }=\frac{2^{13}B}{2^5B}= 2^8B\)

So, index bit = 8

MM = tag + index + block offset

32 = tag +8 + 5

tag =19 bits

Tag  index Block Offset
19bits  8 bits  5 bits 

Total bits required to store meta-data of 1 line =  Valid bit +  Modified bit + tag bit

Total bits required to store meta-data of 1 line = 1  + 1 + 19 =21 bits

Cache memory has 256 lines

So, Total memory required =21 bits × 256 = 5376 bits

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

...