Question

If the associativity of a processor cache is doubled while keeping the capacity and block size unchanged, which one of the following is guaranteed to be NOT affected?

Choose one option
Official answer and solution
Official answer
D
From
Official GATE 2014 answer key

Solution

Analyze how doubling set-associativity alters cache address bit fields while keeping capacity and block size fixed.

  1. Cache Parameters:

    • Let cache capacity be CC bytes, block size be BB bytes, and set associativity be PP ways.
    • Total blocks in cache N=CBN = \frac{C}{B} (constant).
    • Number of sets S=NPS = \frac{N}{P}.
  2. Doubling Associativity (P′=2PP' = 2P):

    • Number of sets is halved: S′=N2P=S2S' = \frac{N}{2P} = \frac{S}{2}.
    • Set index bits =log⁡2(S′)=log⁡2(S)−1= \log_2(S') = \log_2(S) - 1 decreases by 1 bit   ⟹  \implies Width of set index decoder changes.
    • Block offset bits =log⁡2(B)= \log_2(B) remains unchanged.
    • Tag bits =Address bits−Index bits−Offset bits= \text{Address bits} - \text{Index bits} - \text{Offset bits} increases by 1 bit   ⟹  \implies Width of tag comparator changes.
    • Number of ways per set doubles to 2P2P   ⟹  \implies Width of way selection multiplexor changes (from PP-to-1 to 2P2P-to-1).
  3. System Bus Width:

    • The data bus between the processor/cache subsystem and main memory is determined by external system bus architecture and physical memory module widths.
    • Internal cache organization (associativity) has no impact on this bus width. Thus, the width of the processor to main memory data bus is guaranteed to be NOT affected (Option D).
Final answer

D

Common trap

Thinking that tag comparator width remains constant; since index bits decrease by 1, tag bits must increase by 1 to cover the full physical address.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2014 Computer Science and Information Technology (CS) Session 2
Question
54 of 65, printed as CS Q.44
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.