Consider the following information
What will be the Average memory access time based on the following information ?
My Approach => I am giving my approach of how i understood this question. Please check it.
Average memory access time
==>
Probability of NO page fault (Memory access time)
+
Probability of page fault (Page fault service time)
==>
0.99 ( TLB hit (TLB access time + cache hit + cache miss) + TLB miss (TLB access time + Page table access time + cache hit + cache miss) )
+
0.01 (TLB access time + page table access time + Disk access time)
==>
0.99 ( 0.95 (1 + 0.90(1) + 0.10(1 + 5)) + 0.05(1 + 5 + 0.90(1) + 0.10(1 + 5)))
+
0.01 (1 + 5 + 100)
Is the given expression correct ?
Please let me know, that, is my approach right or have i committed some mistakes?
Can Anyone help me ?
PS : I am having my mid term next week and need to practice such questions
In your case the tricky line is cache is physically addressed
meaning before hitting it we must perform the translation (as programs use virtual addresses)
I build the following probability tree to compute the average. We will be reducing it from leaves to calculate the whole average. Rules are super easy: we calculate branch costs and multiply them by the probability pretty much like you did in your calc. The value I get is 2.7225
Note: that we pay 1 cycle for cache access anyway
Note: we pay 1 cycle for TLB anyway
1 + 0.95*1.5 + 0.05*5.95 = 1 + 1.425 + 0.2975 = 2.7225