1,627 views

In a paged memory, the page hit ratio is 0.40. The time required to access a page in secondary memory is equal to 120 ns. The time required to access a page in primary memory is 15 ns. The average time required to access a page is ____

1. 105
2. 68
3. 75
4. 78

What did you try?

HINT: Every time a page hit occurs, the memory access time will be only that of the main memory. However, when there is a miss, the OS will have to fetch the page from the secondary memory. You are given both the probabilities, so after that it'll be trivial.
why in case of miss main memory accesss time along with secondary memory access time is not added
I think this should be the approach:-

Avg Access Time  =  0.4*(15) + 1*(15+120) = 6 + 135 = 141ns

as we know the in the secondary memory we take hit rate  = 1

but no option matches .

Page hit means we access the page from the main memory and page miss means we access it from the secondary memory:

$.40 * 15+.60*120 = 78$

Hence, answer is $78 \, ns$

why main memory access time is not included in the case of page miss.

because page miss only occurs when we find the data in the main memory then if not present in the main memory, then we have to go to the secondary memory. so the total time is (main memory + secondary memory)

correct me if I am wrong?
it should be 87,since secondary memory will be referenced only after the data is not found in main,so main memory access time should be considered in case of miss

Average access time=H*Main memory +(1-H)(main memory+secondary memory access time)

AAT=0.40*15+0.6(120+15)=6+81=87ns
Hi,

That should usually be the case. However, as you can see that it does not match any of the options given, we have to assume that $120ns$ includes the time to fetch the page from the secondary memory to the main (primary) memory and then access it from there.
Average Time Required to Access Page=0.40*15+0.60*120=6+72=78

Option (4) is correct.

### 1 comment

quite wrong
PAGE HIT = page present in ram or main memory

PAGE MISS = page fault so page swapped from the secondary memory

page hit ratio is 0.4, so

0.4*15 + 0.6* (15+120) = 87ns

because we look for a page in secondary memory when the page is not present in the main memory, therefore, we need to add main memory lookup time.
by

question is not clear about page table but solving without considering page table wil be appropriate

Average Access Page time = 0.4 x15 + 0.6(120+15)  = 6 + 81 => 87ns

with page table

Average Access Page time = 0.4 (15+15) + 0.6(120+15+15)  = 12+90 => 112ns

1
1,053 views