The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
594 views

Page tables are stored in memory , which has access time of 100 ns. The TLB holding 8 page table entries, has an access time of 10 ns. Using execution of process , it is found that 85 % of the time, a required page table entry exist in TLB and only 2 % of the total references causes page fault. Page replacement time is 2 ms . Calculate the effective memory access time , assuming page memory access requires 2 memory accesses and TLB requires one memory access.

A) 38120 ns B) 40000 ns C) 40120 ns D) None

asked in Operating System by Boss (18.3k points) | 594 views
0
what if page fault occured in case of TLB hit also. Should we not consider that in this?

2 Answers

+1 vote

Page table access time=$100 ns$

TLB has 8 PTE and access time of a PTE is $10 ns$, that means TLB access time $10 ns$

Page Table are in TLB i.e. TLB  hit time$=85$%

Page Fault is for $=2$%

TLB miss time $=13$%

For TLB hit =$1$ memory access

For TLB miss=$2$ memory access

So, Effective Memory Access Time$=0.85\left (100+10 \right )+0.13\left ( 100+100 \right )+\frac{2}{100}\times 2000000$

$=40119.50ns\simeq 40120ns.$

Ans $C)$

https://www.inf.ed.ac.uk/teaching/courses/os/slides/10-paging16.pdf

Similar ques from book https://gateoverflow.in/211302/operating-system-by-harris

answered by Veteran (100k points)
0
GOt it !

btw very confusing  :3
0
Exactly! :(
0
when TLB hit also, it should goto Main Memory, then Page fault may occurs.

Note that it is TLB, used for direct access of memory by avoiding pagetables.

If it is cache, then as you said Main Memory Access skipped at that time.
0
0
@Shaik how can a page fault occur on a tlb hit?? tlb hit itself means that the particular is present in the main memory. If this wasnt the case then it would have been a tlb miss.
0

@somoshree check this u will get ur answer

https://gateoverflow.in/73973/%23operating-system

0
@Srestha ,Shaik yes a page fault might occur on a tlb hit..but will the answer differ because of this??We never consider page fault with tlb hit while attempting numericals..if there is a page fault in case of tlb hit, then it should be explicitly mentioned in the question..I dont think in any of the sums asked in GATE they considered tlb hit and page fault together..
0
I havenot considered it also :)
0

@Shaik

 EMAT = ( TLBaccess time ) + TLBmiss ( Page table Fetch ) + Page_Fault ( Page_service ) + ( Page_Fetch )

how tlb hit not require any main memory  access? It needs 1 access, explicitely given in question too 

0

how page table not require any main memory  access?

i considered it when TLB miss, Read my comment clearly mam

0 votes

D

0.85(10+110)+0.15(13/15(10+100+100)+2/15(10+100+2000000+100)=40125

85% time there will be a TLB hit so it will take (10+100) ns.

15% of the time two things can happen:

  • X% of the time page fault will occur that is it will take (10+100+2000000+100) ns.
  • (1-X)% of the time no page fault so it will take (10+100+100) ns.

Page fault occurs 2% of the total memory accesses so X% of 15 should be equal to 2.

i.e. 15 * X/100 = 2        X=200/15.

answered by Active (2.1k points)
0

@Viral Kapoor 

how 13/15 comes in your equation? 

0
can u explain how you got those accesses time and what all are your considerations?

Related questions

+1 vote
2 answers
5


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

42,415 questions
48,474 answers
154,481 comments
62,891 users