CSE230–Assignment1
Question1:Aprogramwith520Minstructionsisrunontwodifferentprocessors,CPU1and
CPU2withthefollowingspecifications:
CPU1specifications:4.6GHzclockandaCPIof1.8
CPU2specifications:5.2GHzclockandaCPIof1.3
(a)HowfastisCPU1whencomparedtoCPU2whileexecutingtheaboveprogram?(5
points)
CPU1time=520*1.8/4.6x109
CPU2time=520*1.3/5.2x109
=.64
𝐶𝑃𝑈2
𝐶𝑃𝑈1
b)Adesignerdecidestoreducetheexecutiontimeoftheprogramby12%,by
modifyingtheISA.ButtheaverageCPIhasincreasedby18%.Thus,thisrequiresa
changeintheclockrate.WhatclockrateisrequiredoneachoftheCPUstoachieve
this?(15points)
Speed1=4.6/1.8=2.56
Speed2=5.2/1.3=4
CPU11.3*2.56*1.18*1.8=6.08
CPU21.136*4*1.18*1.8=6.72
Question2:Thehardwareimplementationofaprogramusesdifferentclassesofinstructionsas
shownintheTablebelow.ThisprogramisrunonaProcessorwhichhasaclockrate4.8GHz.
a.WhatistheCPI(cyclesperinstruction)fortheprogram?(5points)
InstructionCount1:8+3+6+4=21instructions
CPUClockCycles:8(1)+3(2)+6(3)+4(4)=48cycles
CPI= = =2.28
𝐶𝑃𝑈 𝐶𝑙𝑜𝑐𝑘𝐶𝑦𝑐𝑙𝑒𝑠
𝐼𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛 𝐶𝑜𝑢𝑛𝑡
48
21
b.WhatistheperformanceoftheProcessor?(5points)
Performance= = =2.1
𝐶𝑙𝑜𝑐𝑘 𝑅𝑎𝑡𝑒
𝐶𝑃𝐼
4.8
2.28