0 votes 0 votes Operating System page-fault operating-system effective-memory-access page-replacement page + – gourav94240 asked Oct 19, 2018 gourav94240 1.5k views answer comment Share Follow See all 15 Comments See all 15 15 Comments reply gourav94240 commented Oct 19, 2018 reply Follow Share While going for page fault ,Memory access time need to be added seprately OR it is included in page fault service time 0 votes 0 votes akash.dinkar12 commented Oct 19, 2018 reply Follow Share while going for page fault, our OS takes control from the process, the OS will take out that page from secondary memory, generally Page fault service includes everything, context switch from running process to OS process and then transferring bytes from secondary memory to main memory and then again context switch from os [rocess to earlier process that was running, Actually, we need to include Main memory time as well when we go for page fault but nowadays there are much time difference between MM access time and page fault access time(one is ns and other will be in msec), so we generally don't take MM access time while servicing page fault only page fault time is sufficient.All the GATE questions are following this... 0 votes 0 votes Dharmendra Lodhi commented Oct 19, 2018 reply Follow Share Ans : 59502 ? 0 votes 0 votes arya_stark commented Oct 19, 2018 reply Follow Share 63?? 0 votes 0 votes Dharmendra Lodhi commented Oct 19, 2018 reply Follow Share how arya_stark 0 votes 0 votes akash.dinkar12 commented Oct 19, 2018 i edited by akash.dinkar12 Oct 19, 2018 reply Follow Share Average time to access virtual address = conversion from the virtual address to physical address + access a byte or word from main memory conversion from the virtual address to physical address = 0.99(1ns + 100 ns) + 0.01(1ns + 100 ns) = 99.99 ns + 1.01 ns = 101 ns Access a byte from MM =0.0001 * 6 ms + 0.9999 * 100 ns = 600 ns + 99.99 ns =699.99 ns Total time = 800.99 ns cycle time = 1/frequency = 1/109 Hz = 1 ns Number of cycles nearly =699.99 cycles = 700 cycles 0 votes 0 votes gourav94240 commented Oct 19, 2018 i edited by gourav94240 Oct 19, 2018 reply Follow Share 108 is correct ans 0 votes 0 votes Dharmendra Lodhi commented Oct 19, 2018 i edited by Dharmendra Lodhi Oct 19, 2018 reply Follow Share h=tlb hit rate ,Ttlb=tlb access time , Tmm=main memory access time, p= page fault, Tpt=page table access time, Tf= page fault service time EAT = h(Ttlb+Tmm)+(1-h){Ttlb + (1-p)(Tpt+Tmm)+p(Tmm+Tf)} EAT=0.99(1+100)+0.01{1+0.9999(100+100)+0.0001(100+6000000)} EAT=107.98 ns cycle time = 1ns so number of cycles = 108 0 votes 0 votes akash.dinkar12 commented Oct 19, 2018 reply Follow Share yes 0 votes 0 votes aambazinga commented Oct 19, 2018 reply Follow Share @Dharmendra Lodhi in the expression of your EAT=0.99(1+100)+0.01{1+0.99(100+100)+0.01(100+6000000)}, the part i've bolded should be 0.0001, because 0.01% is the page fault rate, which will be 0.0001 after conversion. accordingly answer would be 108 ns. maybe i could be wrong, but please check it once. 0 votes 0 votes Dharmendra Lodhi commented Oct 19, 2018 reply Follow Share thanks @aambazinga for pointing out mistake 0 votes 0 votes Magma commented Oct 19, 2018 i edited by Magma Oct 19, 2018 reply Follow Share Given , How many cycles are required to access virtual address Avg time to taken to access VA : = Time taken to covert Virtual address into physical address + fetch the byte from the physical address = TTLB + PTLB_MISS * Memory access + Pagefault *(Page_fault_service) + Memory access time = 1 ns + 0.01*100 + 0.0001 * 6 x 10 6 + 100 = 1 +1 + 600 + 100 = 702 ns 0 votes 0 votes Dharmendra Lodhi commented Oct 19, 2018 reply Follow Share magma why you are not taking memory accessing time after tlb hit, because in tlb only address will be found then have to access memory also. 0 votes 0 votes Magma commented Oct 19, 2018 reply Follow Share Dharmendra Lodhi thanks 0 votes 0 votes Dhawal S 1 commented Dec 6, 2018 reply Follow Share @Magma @Dharmendra Lodhi Is the answer 702 or 108. I too got 702. Please tell me. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Answer 702 I have learn many places 2nd is more accurate formula Ram Swaroop answered Jul 1, 2019 Ram Swaroop comment Share Follow See all 2 Comments See all 2 2 Comments reply Ashutosh777 commented Jul 9, 2020 reply Follow Share there are many ques based on this: https://gateoverflow.in/238144/test-series https://gateoverflow.in/333178/gate2020-cs-53 its always an ambiguity 0 votes 0 votes Ashutosh777 commented Jul 9, 2020 reply Follow Share 1-h[p*(t+PS+m)+1-p(t+m+m)]=TLB MISS h*(t+m)=TLB HIT add both of them to get the ans. h=tlb hit rate,p=page fault rate,m=memory access,PS=page fault service time in case of tlb miss two cases possible: case a: page fault occurs(this means our page is not in the main memory itself) Now in this case we will first service the page fault(assuming PS includes memory access time also) NOTE:here we have added t+m(this is time wasted during tlb miss) case b:no page fault(means our page is in the main memory we can directly access it using one memory access) here also we have added t+m time wasted in tlb miss. https://gateoverflow.in/669/gate2000-2-22(here arjun sir assumed memory access time is included in page fault service time,(see sachin mittal sir comment also)) https://gateoverflow.in/278928/self-doubt-effective-memory-access-time(see this discussion) 0 votes 0 votes Please log in or register to add a comment.