Consider a system with a two-level paging scheme in which a regular memory access takes 150 nanoseconds, and servicing a page fault takes 8 milliseconds. An average instruction takes 100 nanoseconds of CPU time, and two memory accesses. The TLB hit ratio is 90%, and the page fault rate is one in every 10,000 instructions. What is the effective average instruction execution time?
(A)645ns
(B)1050ns
(C)1215ns
(D)1230ns
What I got is
Average Instruction Execution time=100ns(CPU Time)+ 2 Memory Access.
Since, Each memory access may include TLB hit and page fault
So,
Average Memory Access Time=TLB hit rate*(TLB access time+1 Memory reference(150ns))+ TLB Miss*((Page fault rate x Page Fault service time) +(1-page fault rate)*(3 Memory reference because of 2 level paging.))
Since, TLB access time not given, assuming it to be 0.
So, average memory access time=$0.9(150)+0.1*(10^{-4}(8*10^6)+(1-10^{-4})(450))=259.9955ns$
So, Average Instruction Execution Time: $100+2*(259.9955)=619.991ns$
But my answer came to be wrong and it is given 1260ns.
Can somebody help me where I am wrong?