Question

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 place) is _______.

Official answer and solution
Accepted answers
154.5 to 155.5
From
Official GATE 2020 answer key

Solution

Calculate effective memory access time by combining TLB hit, page table access, and page fault service paths.

System parameters:

  • TLB access time: Ttlb=20 nsT_{\text{tlb}} = 20\text{ ns}
  • Main memory access time: Tm=100 nsT_m = 100\text{ ns}
  • Disk page transfer time: Td=5000 nsT_d = 5000\text{ ns}
  • TLB hit ratio: h=95%=0.95h = 95\% = 0.95
  • Page fault rate: p=10%=0.10p = 10\% = 0.10 (on TLB miss)
  • Dirty page write-back proportion: 20%=0.2020\% = 0.20 of page faults

Case 1: TLB Hit (probability 0.95):

  • Address translation found in TLB (20 ns), then data accessed in main memory (100 ns):
    Thit=20+100=120 nsT_{\text{hit}} = 20 + 100 = 120\text{ ns}

Case 2: TLB Miss (probability 0.05):

  • TLB lookup performed first (20 ns20\text{ ns}).
  • Page table in main memory accessed (100 ns100\text{ ns}).
    • Subcase 2a: No Page Fault (probability 1−0.10=0.901 - 0.10 = 0.90):
      • Data accessed in main memory (100 ns100\text{ ns}).
      • Total time = 20+100+100=220 ns20 + 100 + 100 = 220\text{ ns}.
    • Subcase 2b: Page Fault (probability 0.100.10):
      • Disk service: 20% need write-back and read (2×5000=10000 ns2 \times 5000 = 10000\text{ ns}), 80% need only read (5000 ns5000\text{ ns}).
      • Average disk transfer time = 0.20×10000+0.80×5000=2000+4000=6000 ns0.20 \times 10000 + 0.80 \times 5000 = 2000 + 4000 = 6000\text{ ns}.
      • Then data accessed in main memory (100 ns100\text{ ns}).
      • Total time = 20+100+6000+100=6220 ns20 + 100 + 6000 + 100 = 6220\text{ ns}.
  • Average TLB miss time:
    Tmiss=20+100+[0.90×100+0.10×(6000+100)]=120+[90+610]=820 nsT_{\text{miss}} = 20 + 100 + [0.90 \times 100 + 0.10 \times (6000 + 100)] = 120 + [90 + 610] = 820\text{ ns}

Average Memory Access Time (AMAT):

AMAT=0.95×120+0.05×820=114+41=155.0 ns\text{AMAT} = 0.95 \times 120 + 0.05 \times 820 = 114 + 41 = 155.0\text{ ns}

(Accepted range: 154.5 to 155.5 ns).

Final answer

155.0

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

Source

Paper
GATE 2020 Computer Science and Information Technology (CS)
Question
63 of 65, printed as CS Q.53
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.