A processor uses 32-bit addresses and has a 128 KB, 8-way set-associative cache. The block size is not specified but is known to be a power of two. What is the number of bits in the tag field?
D
Cache Memory, Memory Hierarchy and Address Translation short notes for GATE CS: 6 study cards covering concepts, formulas, shortcuts and exam traps, plus solv
3 more cards in this chapter
Answer it here to see how it works. Nothing is recorded until you sign in.
Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.
Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.
Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.
We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.
Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.
Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.
Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.
No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.
Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.
Cache Memory, Memory Hierarchy and Address Translation short notes for GATE CS: 6 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.
Six-step checklist
Remember: conflict miss = two different blocks, one line, alternating access. That is the whole game.
Write policies
Allocation policies
Replacement policies
Remember: write-back needs dirty bit, write-through does not. Writebacks occur only in write-back on dirty eviction.
A processor uses 32-bit addresses and has a 128 KB, 8-way set-associative cache. The block size is not specified but is known to be a power of two. What is the number of bits in the tag field?
D
A processor uses 32-bit addresses and has a 32 KB, 4-way set-associative cache. The block size is not specified but is known to be a power of two. What is the number of bits in the tag field?
C
An urn contains 3 red and 2 black balls. A Polya Urn process is run for draws. For how many values of is the probability of drawing a red ball on the -th draw strictly greater than ?
A
Key idea: The martingale property of the Polya Urn process.
Step 1: The martingale property states that the expected proportion of red balls remains constant throughout the process.
Step 2: Consequently, the probability of drawing a red ball at any specific step is exactly equal to the initial proportion of red balls.
Step 3: Initial proportion = .
Step 4: Since the probability is always exactly , it is never strictly greater than for any .
Answer: 0.
In a Polya Urn process starting with 2 red and 3 black balls, what is the expected number of red balls drawn in 10 draws?
B
Key idea: Linearity of expectation and the constant probability of drawing red.
Step 1: The probability of drawing a red ball at any specific step is the initial proportion .
Step 2: Here, .
Step 3: Let be the indicator variable for drawing red on step . .
Step 4: The total number of red balls drawn in draws is .
Step 5: By linearity of expectation, .
Answer: 4.
An urn initially contains 2 red and 8 black balls. A Polya Urn process is run. For how many values of is the expected proportion of red balls in the urn exactly ?
D
Key idea: The martingale property of the Polya Urn process.
Step 1: The martingale property states that the expected proportion of red balls after draws is exactly equal to the initial proportion.
Step 2: Initial proportion = .
Step 3: Therefore, for ANY number of draws , the expected proportion is exactly .
Step 4: Since this holds for all , it holds for all 5 values in the set.
Answer: 5.
Consider the following cache tagging strategies:
How many of these strategies inherently avoid the synonyms problem without requiring the cache index size to be strictly less than or equal to the page size?
B
Key idea: Synonyms occur when different virtual addresses map to the same physical address but different cache indices.
Step 1: VIVT uses virtual indices. Different VAs mapping to the same PA can have different indices, so it suffers from synonyms.
Step 2: PIPT uses physical indices. Since the PA is the same, the index is the same. It inherently avoids synonyms without any size constraints.
Step 3: VIPT uses virtual indices. It only avoids synonyms if the virtual index bits are a subset of the page offset bits (which are identical for the same PA). This requires the index size constraint.
Step 4: Only PIPT (1 strategy) inherently avoids synonyms without the constraint.
Answer: B
For a computer system with a 16-bit physical address, the address is divided into tag, index, and offset fields. If the block size is 16 bytes, what is the maximum possible number of index bits, assuming the tag field must be at least 1 bit?
A
Key idea: This is an observation and boundary question, recognisable because it asks for a "maximum possible" value under a specific constraint (tag 1 bit).
Step 1: Identify total address bits = 16.
Step 2: Calculate offset bits. Block size = 16 bytes = bytes, so offset = 4 bits.
Step 3: Apply the address decomposition formula: .
Step 4: Substitute knowns: . This simplifies to .
Step 5: To maximize the index, we must minimize the tag. The constraint states tag 1 bit. So, minimum tag = 1.
Step 6: Maximum index = bits.
Answer: 11 bits.
In a direct-mapped cache system, the specific cache line to which a main memory block is mapped is uniquely determined by which part of the memory address?
B
Key idea: This is a direct formula question, recognisable because it asks for the specific address field responsible for the cache line mapping.
Step 1: Recall the address decomposition for a direct-mapped cache. The physical address is split into Tag, Index, and Offset.
Step 2: The Index field directly selects the cache line. The mapping formula is , which is exactly what the Index bits represent.
Step 3: The Tag identifies the block, the Offset identifies the byte, and the Valid bit is metadata, not part of the address mapping.
Answer: The Index field.
A system uses a 20-bit physical address and a direct-mapped cache with a block size of 32 bytes. If the cache is designed to have at least 4 lines, what is the maximum possible number of bits in the tag field?
B
Key idea: This is an observation and boundary question, recognisable because it asks for a "maximum possible" value under a specific constraint (at least 4 lines).
Step 1: Identify total address bits = 20.
Step 2: Calculate offset bits. Block size = 32 bytes = bytes, so offset = 5 bits.
Step 3: Apply the address decomposition formula: .
Step 4: Substitute knowns: . This simplifies to .
Step 5: To maximize the tag, we must minimize the index. The constraint states "at least 4 lines". Since , the minimum index bits = 2.
Step 6: Maximum tag = bits.
Answer: 13 bits.
A direct-mapped cache has a capacity of 64 KB and a block size of 32 bytes. The physical address is 32 bits. How many bits are required in total to store all the tag values for the entire cache?
A
Key idea: This is a casework question, recognisable because it requires calculating multiple fields (lines, index, offset, tag) and then combining them to find a total storage metric (total tag memory).
Step 1: Calculate total cache lines. Cache size = 64 KB = bytes. Block size = 32 bytes = bytes. Lines = .
Step 2: Calculate index bits. bits.
Step 3: Calculate offset bits. bits.
Step 4: Calculate tag bits. bits.
Step 5: Calculate total tag memory. Total bits = Tag bits Number of lines = .
Answer: bits.