in Operating System recategorized by
1,627 views
0 votes
0 votes

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
in Operating System recategorized by
1.6k views

3 Comments

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.
1
1
why in case of miss main memory accesss time along with secondary memory access time is not added
0
0
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 .
0
0

4 Answers

3 votes
3 votes
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$

3 Comments

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?
1
1
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
0
0
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.
0
0
1 vote
1 vote
Average Time Required to Access Page=0.40*15+0.60*120=6+72=78

Option (4) is correct.

1 comment

quite wrong
0
0
0 votes
0 votes
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
0 votes
0 votes

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

Related questions