CA 714CA  - Homework #7 solution


3.24
We need to achieve an average instruction fetch rate f that will be equal to the average instruction
completion rate c. In order to do that, we need to try to fetch more instructions, so that after the
cache misses we will actually achieve f = c.

If we model the average instruction memory access time as h+mp then it's easy to see that the
number of instructions we must attempt to fetch is:

                                    f(m,h,p) = c ( h+mp ).

    We graph the previous equation for c = 4 and for values 0.01<=m<=0.1, 10<= p<=100, 1<=h<=2.
    Actually we made two graphs for h=1 and h=2.
 
 

I) h=1, f(m,p)=4(1+m*p)

I) h=2, f(m,p)=4(2+m*p)


 
 

As we can see, the average memory access time is very important, since for varying h, m, p it can be
as low as 1.1 and as high as 12. Multiplying by the completion rate c=4, we see that the result in the
worst case is more than 40 times worst than the optimal.