Answer:
310 ns
Explanation:
Given that
TLB hit ratio = 90%
TLB hit ratio = 90/100
TLB hit ratio = 0.9
Time needed to access TLB = 15 ns
Time needed to access main Memory = 85 ns
Effective memory access time = ?.
The formula for finding the effective memory access time is given by
The effective memory access time = [TLB Hit ratio (main memory access time + required time to access TLB) + [2 * (main memory access time + required time to access TLB)] * (2 - TLB hit ratio)]
On substituting the values given in the question to the equation, we have
The effective memory access time = [0.9 (85 + 15) + [2 * (85 + 15)] * (2 - 0.90)]
The effective memory access time =
[(0.9 * 100) + (2 * 100) * 1.1]
The effective memory access time =
(90 + (200 * 1.1))
The effective memory access time =
90 + 220
The effective memory access time =
310 ns
N = 0
<span>1 read x </span>
<span>n = n + 1 </span>
<span>print x </span>
<span>If n > 1, go down to 2 </span>
<span>small = x </span>
<span>large = x </span>
<span>2 If x</= small, then small = x </span>
<span>If x>/= large, then large = x </span>
<span>If n < 12 , go back up to 1 </span>
<span>Print small </span>
<span>Print large </span>
<span>end</span>