Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose you are the head of a computer architecture group that has produced a co

ID: 3817371 • Letter: S

Question

Suppose you are the head of a computer architecture group that has produced a computer system whose main memory has an access time of 250ns. Careful statistical sampling has indicated that each instruction requires an average of 2 memory accesses and has an average execution time (exclusive of memory accesses) of 150ns. Three members of your group each present proposals to speed up this system and their proposals are given below. Rank these proposals assuming each costs the same. Justify your ranking.

(a) Use a main memory that is twice as fast.

(b) Add enough CPU registers to reduce memory accesses to an average of 1.5 memory accesses per instruction. Assume tm = 250ns.

(c) Add a cache to the system with tc = 50ns and a hit ratio h = 0.9. Assume that upon a cache miss, a word is first transferred from main memory to cache and then from cache to the CPU. Assume tm = 250 ns and an average of 2 memory accesses per instruction.

Explanation / Answer

The current execution time with access time 250 ns we would have 2*250 +150=650 ns.

(a) Using a faster Main Memory would seem the required soluion but, it is not the apt one. Twice as fast indicates access time is reduced to 125 ns so the execution time of an average instruction with 2 memory access becomes

2*125+150=400 ns.

(b)Adding more registers such that we can get 1.5 memory acces per instruction, now the execution time becomes

2/1.5 *250 +150= 483.34 ns

(c)Adding cache to system which reduces main memory acces with cache access time 50 ns and hit ratio =0.9. It means that 9 out of 10 times the data is available in cache and we need not fetch the data from main memory which is slow. Now the execution time is

In order to find execution time we have a formula

T = h*c+ (1-h) M

   Where h = hit rate=0.9 (given)

     (1-h) = miss rate=0.1     

       c   = time to access information from cache=50 ns

        M = miss penalty (time to access main memory) =250 ns

Here average instruction has 2 accesses, so average time is

T = 2(h*c+ (1-h) M)

T=2(0.9*50+0.1*250)

=2(45+25) =140 ns

From the approaches , we have the access times are

a) 400 ns

b)483 ns

c)140 ns

The best is the Third option i.e., (c) Add a cache to the system. Not just based on the execution time but the approach involves minimal memory accesses

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote