Skip to main content

GATE CSE 2019Operating System › Memory Management & Virtual MemoryVerified

GATE CSE 2019 PYQ: Assume that in a certain computer, the virtual addresses are 64 64 64 bits long and the physical addresses…

Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressible. The page size is 8 kB and the word size is 4 bytes. The Translation Look-aside Buffer (TLB) in the address translation path has 128 valid entries. At most how many distinct virtual addresses can be translated without any TLB miss?

  1. A
    16×21016 \times 2^{10}
  2. B
    256×210256 \times 2^{10}
    Correct answer
  3. C
    4×2204 \times 2^{20}
  4. D
    8×2208 \times 2^{20}

Answer

(B) 256 × 2 10 256 \times 2^{10} 256 × 2 10

Approach

Each TLB entry maps one virtual page, so the maximum number of virtual addresses that can be translated without a miss is (number of valid TLB entries) × (number of word addresses per page).

A valid TLB entry corresponds to one virtual page. With $2^{11}$ word addresses per page and $2^7$ TLB entries, the maximum distinct virtual addresses translated without a miss is $2^7$ × $2^{11} = 2^{18} = 256$ × $2^{10}$. Therefore option B is correct.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.