edited by
18,896 views
56 votes
56 votes
In a two-level virtual memory, the memory access time for main memory, $t_{M}=10^{-8}$ sec, and the memory access time for the secondary memory, $t_D=10^{-3}$ sec. What must be the hit ratio, $H$ such that the access efficiency is within $80$ percent of its maximum value?
edited by

7 Answers

3 votes
3 votes

2 level virtual memory meaning 2 level of page tables+1 main memory+1 secondary memory

now all necessary page tables reside in main memory itself...DO NOT ASSUME PAGE FAULTS WHEN FETCHING PAGES OF PAGE TABLES..

so what we do is after cpu generates virtual address we access 2 levels of page tables from main memory successfully then we get the frame number and finally access main memory the third time to see if that frame is already in there or not ..

if its there its cool else access secondary memory..

so....=> 2×10^(-8) + H×10^(-8) + (1-H)×(10^-3+10^-8)

        => 3×10^(-8) + (1-H)×10^(-3) 

        => as it's in the selected answer of @Arjun sir.

now "80 % OF MAXIMUM VALUE"----- maximum value means what maximum access time including all probability (hit miss ratios and all included in computing).

now access efficiency meaning minimum time in ideal case..so 2 time main memory access for page tables and then 1 time agin main memory access for frame.

so, 3×10^(-8)=0.8×[ 3×10^(-8) + (1-H)×10^(-3)]

=> h=99.99%

0 votes
0 votes
Main memory access time  $t_{M}$ = $10^{-8}$ sec

Secondary memory access time $t_{D}$ = $10^{-3}$ sec

Efficiency = $\eta$ = 80% = 0.8

Average access time = $t_{avg}$ = $\eta$ x $t_{M}$ = 0.8 x $10^{-3}$ sec

$t_{avg}$ = H x $t_{M}$ + (1 – H) $t_{D}$

0.8 x $10^{-3}$ = H x $10^{-8}$ + (1 – H) x $10^{-3}$

0.8 = H x $10^{-5}$ + (1 – H)

H – (H x $10^{-5}$) = 0.2

H = 0.2 / (1 – $10^{-5}$ = 2.00002 = 20%

The hit ratio H must be 20%.
0 votes
0 votes
Please rectify me where I am going wrong.....

Access time efficiency is 80% of its maximum value.
Access time is maximum if H=0 that is the worst case.

As we need 2 level page table access and one main memory access and secondary memory access (as it is worst case) so..
Now in worst case access time will be = 3*10^-8 + 10^-3

According to question:-
0.8*(3*10^-8 + 10^-3) = H*(3*10^-8) + (1-H) * (3* 10^-8 + 10^ -3)
H= 0.200006 ≈ 20%
reshown by
Answer:

Related questions

23 votes
23 votes
1 answer
1
makhdoom ghaya asked Nov 18, 2016
5,741 views
Under paged memory management scheme, simple lock and key memory protection arrangement may still be required if the _________ processors do not have address mapping hard...
16 votes
16 votes
2 answers
2
16 votes
16 votes
2 answers
3