GateAI
Memory Management and Virtual Memory

GATE CSE 2020 · Q53

NAT2 marksMedium

Time

Consider a paging system that uses 1-level page table residing in main memory and a TLB for address translation. Each main memory access takes 100 ns and TLB lookup takes 20 ns. Each page transfer to/from the disk takes 5000 ns. Assume that the TLB hit ratio is 95%, page fault rate is 10%. Assume that for 20% of the total page faults, a dirty page has to be written back to disk before the required page is read in from disk. TLB update time is negligible. The average memory access time in ns (round off to 1 decimal places) is ________.

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 155 (±0.5) (±0.5)

Memory Management and Virtual Memory

To calculate the Effective (Average) Memory Access Time (EMAT):

Given:

  • TLB lookup time, tTLB=20 nst_{\text{TLB}} = 20\text{ ns}

  • Main memory access time, tm=100 nst_m = 100\text{ ns}

  • TLB hit ratio, h=0.95h = 0.95

  • TLB miss ratio, 1−h=0.051 - h = 0.05

  • Page fault rate (on memory/page table access upon TLB miss), p=0.10p = 0.10

  • Disk transfer time per page = 5000 ns5000\text{ ns}

Page Fault Service Time (SS):

  • For 20%20\% of page faults, a dirty page must be written back and the new page read in (2 disk transfers = 2×5000=10000 ns2 \times 5000 = 10000\text{ ns}).

  • For 80%80\% of page faults, only the new page is read in (1 disk transfer = 5000 ns5000\text{ ns}).

S=0.20×(2×5000)+0.80×5000=2000+4000=6000 nsS = 0.20 \times (2 \times 5000) + 0.80 \times 5000 = 2000 + 4000 = 6000\text{ ns}

Cases for Memory Access:

  1. TLB Hit (probability = 0.950.95):

    Time=tTLB+tm=20+100=120 ns\text{Time} = t_{\text{TLB}} + t_m = 20 + 100 = 120\text{ ns}
  2. TLB Miss (probability = 0.050.05): First, TLB is looked up (20 ns20\text{ ns}), then page table in main memory is accessed (100 ns100\text{ ns}):

    • No Page Fault (probability = 1−p=0.901 - p = 0.90):

      Time=20+100+100=220 ns\text{Time} = 20 + 100 + 100 = 220\text{ ns}
    • Page Fault (probability = p=0.10p = 0.10):

      Time=20+100+S+100=20+100+6000+100=6220 ns\text{Time} = 20 + 100 + S + 100 = 20 + 100 + 6000 + 100 = 6220\text{ ns}

Overall EMAT:

EMAT=20+0.95(100)+0.05[100+(1−p)(100)+p(S+100)]\text{EMAT} = 20 + 0.95(100) + 0.05\left[ 100 + (1 - p)(100) + p(S + 100) \right]
EMAT=20+95+0.05[100+0.90(100)+0.10(6000+100)]\text{EMAT} = 20 + 95 + 0.05\left[ 100 + 0.90(100) + 0.10(6000 + 100) \right]
EMAT=115+0.05[100+90+610]\text{EMAT} = 115 + 0.05\left[ 100 + 90 + 610 \right]
EMAT=115+0.05×800=115+40=155 ns\text{EMAT} = 115 + 0.05 \times 800 = 115 + 40 = 155\text{ ns}

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Memory Management and Virtual Memory previous year question is Q53 of the GATE CSE 2020 paper. Find more GATE CSE PYQs on Memory Management and Virtual Memory in Operating Systems, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Memory Management and Virtual Memory PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Memory Management and Virtual Memory in GATE CSE

Memory Management and Virtual Memory has 32 GATE CSE PYQs across 22 papers from 2011 to 2026. 15 of them are 2-mark NAT questions like this one, and GATE CSE 2020 has 2.

How GATE tests Memory Management and Virtual Memory

More from GATE CSE 2020

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2020 · Q53 · NAT

Consider a paging system that uses 1-level page table residing in main memory and a TLB for address translation. Each main memory access takes 100 ns and TLB lookup takes 20 ns. Each page transfer to/from the disk takes 5000 ns. Assume that the TLB hit ratio is 95%, page fault rate is 10%. Assume that for 20% of the total page faults, a dirty page has to be written back to disk before the required page is read in from disk. TLB update time is negligible. The average memory access time in ns (round off to 1 decimal places) is …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.