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

asked in Operating System by (49 points) | 129 views
While going for page fault ,Memory access time need to be added seprately OR it is included in page fault service time
while going for page fault, our OS takes control from the process, the OS will take out that page from secondary memory, generally Page fault service includes everything, context switch from running process to OS process and then transferring bytes from secondary memory to main memory and then again context switch from os [rocess to earlier process that was running,

Actually, we need to include Main memory time as well  when we go for page fault but nowadays there are much time difference between MM access time and page fault access time(one is ns and other will be in msec), so we generally don't take MM access time while servicing page fault only page fault time is sufficient.All the GATE questions are following this...
Ans : 59502    ?
how arya_stark

Average time to access virtual address = conversion from the virtual address to physical address + access a byte or  word  from main memory


conversion from the virtual address to physical address = 0.99(1ns + 100 ns) + 0.01(1ns + 100 ns)

                                                                                                     =  99.99 ns + 1.01 ns = 101 ns

Access a byte from MM =0.0001 * 6 ms + 0.9999 * 100 ns

                                           = 600 ns + 99.99 ns

                                           =699.99 ns

Total time = 800.99 ns

cycle time = 1/frequency

                 = 1/109 Hz   = 1 ns

Number of cycles nearly =699.99 cycles = 700 cycles

108 is correct ans

h=tlb hit rate ,Ttlb=tlb access time , Tmm=main memory access time, p= page fault, Tpt=page table access time, Tf= page fault service time

EAT = h(Ttlb+Tmm)+(1-h){Ttlb + (1-p)(Tpt+Tmm)+p(Tmm+Tf)}


EAT=107.98 ns

cycle time = 1ns

so number of cycles = 108


@Dharmendra Lodhi

in the expression of your EAT=0.99(1+100)+0.01{1+0.99(100+100)+0.01(100+6000000)}, the part i've bolded should be 0.0001, because 0.01% is the page fault rate, which will be 0.0001 after conversion. accordingly answer would be 108 ns. maybe i could be wrong, but please check it once.

thanks  @aambazinga for pointing out mistake

Given , How many cycles are required to access virtual address

Avg time to taken to access VA :

= Time taken to  covert Virtual address into physical address + fetch the byte from the physical address

= TTLB +  PTLB_MISS * Memory access + Pagefault *(Page_fault_service) + Memory access time

= 1 ns + 0.01*100 +  0.0001 * 6 x 10 6 + 100

= 1 +1 + 600 + 100

= 702 ns


magma why you are not taking memory accessing time after tlb hit, because in tlb only address will be found then have to access memory also.


@Dharmendra Lodhi

Is the answer 702 or 108. I too got 702. Please tell me.

Please log in or register to answer this question.

Related questions

+3 votes
1 answer
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
49,427 questions
53,611 answers
70,885 users