in Operating System
6,371 views
9 votes
9 votes

Let the page fault service time be $10$ ms in a computer with average memory access time being $20$ ns. If one page fault is generated for every $10^6$ memory accesses, what is the effective access time for the memory?

  1. 21.4 ns
  2. 29.9 ns
  3. 23.5 ns
  4. 35.1 ns
in Operating System
by
6.4k views

1 comment

B)30*10^-9=29
0
0

5 Answers

11 votes
11 votes
Best answer

Answer is B

given that one page fault for every 10^6 memory access, so the probability of page fault is  p-> 1/106   

page fault service time is = 10ms-> 10 * 10 ns ( note : given options are in Nano seconds better if you convert this to nano seconds at first).

memory access time is = 20ns

effective access time would be = p * page fault service time + (1-p) * memory access time

=> 1/10^6 *10*10^6+(1-1/10^6)20=>30-1/10^6=> closer answer is 29.9 ns 

selected by

2 Comments

what about this formula? -> memory access time + p * page fault service time.

This is same as ->  (1-p) * memory access time + p( memory access time + page fault service time )

Above formula is applied in case of hierarchical memory organization.

The formula which you have used is applied when all memory modules are each directly connected to CPU.

But in question, there is no mention of which memory organization it is ......So what made you apply that formula. What made you assume that it is the 2nd case and not the 1st one. Please help me .....its getting irritating now
1
1
memory access time should be 2*(memory access time) . one access for “Page table” and second for “main memory” , since it is not mentioned that Page table is stored in a register it is by default stored in main memory.
0
0
7 votes
7 votes

hope it might help.............

2 votes
2 votes

I think correct answer is 30 ns. Part (B) is more closer to it so it could be selected.

Explanation -> 

I am assuming memory  has hierarchical organization. In all cases (Fault or not)  page will be accessed form main memory. 

Notice - Page fault service time does not include memory access time. Please correct me if i am wrong.

(Refer -http://stackoverflow.com/questions/40027359/what-is-page-fault-service-time  and 

https://gateoverflow.in/2122/gate2011-20-ugcnet-june2013-ii-48?show=126742#c126742 )

Case 1(No Page Fault): -  20 ns.

Case 2(Page Fault): - (20 + 10*10^6) ns.

Effective memory access  time  = (1- (1/10^6))*(Case 1 time)  + (1/10^6)*(Case 2 time)  = 20 + 10  = 30 ns. 

edited by

1 comment

nice... this is the correct way!!
1
1
1 vote
1 vote
Answer: