4 votes 4 votes Assume memory access time is 10 μs and reading a page from disk takes 10 ms. If page fault occur in 0.5% of the memory references then what is the average memory access time (in μsec)? Operating System operating-system test-series + – thor asked Sep 22, 2016 thor 824 views answer comment Share Follow See 1 comment See all 1 1 comment reply Pavan Kumar Munnam commented Sep 22, 2016 reply Follow Share 70micro sec?? 0 votes 0 votes Please log in or register to add a comment.
Best answer 4 votes 4 votes Average memory access time = 0.995 ( 10 ) + 0.005 (10 + 10000) = 60 Micro sec. Kapil answered Sep 22, 2016 • selected Sep 23, 2016 by vijaycs Kapil comment Share Follow See all 13 Comments See all 13 13 Comments reply Pavan Kumar Munnam commented Sep 22, 2016 reply Follow Share you also have to include the access time for page table also right? 0 votes 0 votes Kapil commented Sep 22, 2016 reply Follow Share No information regarding page table is given. Assume demand paging. 0 votes 0 votes Pavan Kumar Munnam commented Sep 22, 2016 reply Follow Share even then for bringing out the first required pages it needs to check in page table then it is to be brought in right? 0 votes 0 votes Kapil commented Sep 22, 2016 reply Follow Share Yes, i have included that. Actually 2nd one shows page fault service time . 0 votes 0 votes mcjoshi commented Sep 23, 2016 reply Follow Share @Kapilp @vijaycs Iam a bit confused with questions related to finding Effective access time and hit ratio. Sometimes question is solved like hierarchical access and sometimes like Parallel search. I don't get which one to use where. 0 votes 0 votes Kapil commented Sep 23, 2016 reply Follow Share If the question says that page has to be brought into the memory and then only CPU can access it , then take hierarchical . If nothing is said, then why waste the time to send page to the memory (or in case of cache problems ), there we use bus snooping , that CPU can access directly from disk or memory . https://en.wikipedia.org/wiki/Bus_sniffing 1 votes 1 votes vijaycs commented Sep 23, 2016 reply Follow Share @mcjoshi Here we can also think like - Each memory access takes 10 micro seconds without any page fault. And if there is a page fault (means page is not there in main memory ) then we need to get it from disk (secondary memory). Now here probability of page fault = 0.005. So, memory access time = 10 micro s + 0.005 * 10 mili sec. = 10 micro s + 50 micro sec = 60 micro sec. 1 votes 1 votes mcjoshi commented Sep 23, 2016 reply Follow Share In case of TLB, we access TLB and it contains pointer to memory where that page is present and if it is not present we load it from main memory and then fetch it into TLB and then access it. So, here $T_{avg} = h(t_{tlb} + t{m}) + (1-h)( t_{tlb} + (k+1)t_{m})$ -- k level paging In case of cache, cache contains direct page(not pointer) So, here $T_{avg} = h(t_{c}) +(1-h)(t_{c} + t_{m})$ (similar is the case between primary and secondary memory) And when it is mentioned like "memory contains $3$-level" ex. this question, we consider parallel search. @Kapilp @vijaycs Correct me if Iam wrong anywhere. 0 votes 0 votes mcjoshi commented Sep 23, 2016 reply Follow Share @vijaycs I get the approach you used here ( but iam confused which one to use when faced with some problem) 0 votes 0 votes vijaycs commented Sep 23, 2016 reply Follow Share @mcjoshi , Generally we consider heirarchical search unless some thing is mentioned in the question regarding parallel search. And it all depends on architecture of system. And when we are asked such question then most of them puts us in delemma.between serial and parallel. You can see below question for more details ... https://gateoverflow.in/3653/gate2004-it-12-isro2016-77 1 votes 1 votes mcjoshi commented Sep 24, 2016 reply Follow Share @vijaycs @Kapilp Thanks for taking time to answer by doubt. 2 votes 2 votes thor commented Sep 24, 2016 reply Follow Share This is the answer provided 0 votes 0 votes Kapil commented Sep 24, 2016 reply Follow Share Wrong solution 9.5 + 5 = 10 :( 1 votes 1 votes Please log in or register to add a comment.