Question

Base machine has a 2.4GHz clock rate. There is L1 and L2 cache. L1 cache is...

Base machine has a 2.4GHz clock rate. There is L1 and L2 cache. L1 cache is 256K, direct mapped write through. 90% (read) hit rate without penalty, miss penalty is 4 cycles. (cost of reading L2) All writes take 1 cycle. L2 cache is 2MB, 4 way set associative write back. 95% hit rate, 60 cycle miss penalty (cost of reading memory). 30% of all instructions are reads, 10% writes. All instructions take 1 cycle - except reads which take 1 cycle if data is in L1, but otherwise have a miss penalty

a) Calculate CPI for this machine.

b) Suppose we increase L1 cache to 512K. This improves our hit rate to 95% in L1 , but slows all reads to 2 cycles. What is the CPI with this change?

c) Changing the L1 cache to 4 way set associative increases the hit rate to 94% in L1 but added complexity of hardware means we must reduce the clock rate to 2.3GHz. What is the CPI in this case?

d) Which of the 3 machines is faster for the given instruction mix?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

I have completed this problem in very detailed manner, If you like it. Please give thumbs up.

Step 1 :- Given data is

            Base machine clock rate = 2.4GHz

            L1 cache size is =256KB

            L2 cache size is =2MB

            Hit rate of read(Hr) is =90%

            Miss penalty is =4cycles

            Write takes =1 cycle

            L2 cache is 4 way set associative

          L1 cache is direct mapped

        In L2 cache, hit rate is 95%

     Miss penalty is 60cycles

        30% read instructions,10% write instructions,60% other instructions

Step 2 := (a)

CPI of this machine =0.30(for read)*0.90(hit rate)*1cycle + 0.30(read)*0.10(miss in L1)*0.95(hit in L2)*4(miss peanlty) + 0.30(read)*0.10(miss in L1)*0.05(miss in L2)*60cycles(miss penalty) + 0.10(for write)* 1cycle + 0,60(others)*1cycles = 0.27 + 0.114 + 0.09 + 0.10 + 0.60 = 1.174 CPI

Step 3 :- (b)

Hit rate for read becomes = 95%

CPI of this machine = 0.30(for read)*0.95(hit rate)*2cycle + 0.30(read)*0.05(miss in L1)*0.95(hit in L2)*4(miss peanlty) + 0.30(read)*0.05(miss in L1)*0.05(miss in L2)*60cycles(miss penalty) + 0.10(for write)* 1cycle + 0,60(others)*1cycles = 0.57 + 0.057 + 0.045 + 0.10 + 0.60 = 1.372 CPI

Step 4 :- (c)

Hit rate for read becomes =94%

CPI of this machine =0.30(for read)*0.94(hit rate)*1cycle + 0.30(read)*0.06(miss in L1)*0.95(hit in L2)*4(miss peanlty) + 0.30(read)*0.06(miss in L1)*0.05(miss in L2)*60cycles(miss penalty) + 0.10(for write)* 1cycle + 0,60(others)*1cycles = 0.282 + 0.0684 + 0.054 + 0.10 + 0.60 = 1.104 CPI

Step 4 (d)

Among all 3 machines ,3rd machine is faster because its CPI is very less and faster in execution per instruction compares to other.

Add a comment
Know the answer?
Add Answer to:
Base machine has a 2.4GHz clock rate. There is L1 and L2 cache. L1 cache is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT