{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw1_sol

# hw1_sol - Solution 1.4 1.4.1 P2 Class A 105 instr ‘ Class...

This preview shows pages 1–4. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Solution 1.4 1.4.1 P2 Class A: 105 instr. ‘ Class B: 2 x 105 instr. Class (1:75 x 105 instr. Class D: 2 x 105 instr. \$ec Time = No. instr. x CPL/dock rate Sec: 3" 9J3 x (Es x —— Pl: Time class A r: 0.66 x 10—4 ”5+ CTUQS - Timedass B: 2.66 X 10‘4 Time class C 2 10 x 1973'». Time Class D = 5.33 x 10-3 Tom! time P1 = 18.65 x 11:!“4 P2: TimeclassA 2 104‘ Time class B = 2 x 10-4 Time class C = 5 25710" TimedassD:3x10"4 Total time P2 : 11 x 10—3 , V / 1.4.2 CPI: time x dock rate/No. instr. c 5‘0 _ S u; waffle; Kfl, CP1(P1) = 18.65 x 10" x 1.5 x 1031103 = 2.79 “we S W ”3+ CP1(P2) :- 11x 10‘4 x 2 x 109/103 = 2 2 :~ ‘ . :- Cycles [Md- , 3 ‘ ‘ - ‘ 1.4.3 2 cyzles 3m X clockcycles(Pl)=105xl+2x105><2+5x105><3+2x105x4;28x16§ clockcycles(P2§~103xz+2x103x2+sx1o3x2+2x103x5 22x105 1.4.5 C131 :ffnie'xﬁtiockfék 5:15 091:675 x 1039 x 2 x 1109,3700: 1 92 ‘ ‘ cf}; >€Lku\$x‘- 3 3 ,4; M311 Time=(500x1+50x 15+sz 5+50x325x05x 153=5\$15ns ; Speed-up = 675 115/550 :13 = 1.22 1391:5150 x 10'9x2x 1033;700:157 \$5645 1.6 A“ 1 (S .I 1.6.1 (PP gar.“ 87%; " 1m» CPI = Execution Time * Clock Rate / # instructions ‘4 (s) Compiler A: CPI =1 ' (b) (miner A: (PI *— t V CPI“ ’(MV‘). __ CPI‘LK EV‘S’VE _ _. _. - __.,~ 1.6.2 : Clmmlup‘ (Mk water; Given : Execution Time (A) = Execution Time (B) ‘ Hence, CPIA * # instrA / Clock RateA = CPIB * # instrB / Clock Rate}; Substituting the values: I .~_—_ ; pp . (99 Clock RateA/Clock Rate]; = 0.86 (‘93 UWMQA “W" “‘3 L 1. 1.6.3 . .. ' ( ' i x 9 C 2 Execution Time N... = 1.1 * 600 * 106 *1 * 10‘? = 0.66 sec 33%? C)" ‘5 .x 1W3 X Eff. 7 NM ‘1634 I 7 3105* ﬁrtlés Speed Up = Execution Time on / Execution Time New [00 Speed Up (A) = 1.52 (h) 9 V“; 9? U“ i ‘ “ M6 SpeedUp(B)=2.12 99‘2“) 0? (‘7’)“‘0 7 (lodxmtﬁp‘ ‘_ CPIAX'Mslﬁ , if... 7 Ciﬁdﬁ— ”his (FIB Kﬁmy‘kg ,1 a \n C7495 1.6.4 uni- 12. ’< 7,16 92L ' £74.12 P1: From the table we can see that P1 can at best complete 1 instruction per cycle, and P1 runs at 4 GHz. Hence, peak performance is 4 G inst/s P2: From the table we can see that P2 can at best complete 0.5 instructions per cycle, and P2 runs at 6 GHz. Hence, peak performance is 3 G inst/s £7112 r p, _ . ’ {‘9 . \$9 ._ (ems-{- QC' C gt)" 5 1.6.5 2Lf({i\$ — 2 W5" , , \$/ 7 ' £71163 Let y be the number of instructions executed for each of Class B to E. Therefore, we have 2y instructions of Class A ExecutionTime(P1) =(1*2y+2*y+3*y+4*y+5 *y)l(4*109)=4yns7 ExecutionTime(P2) =(2 * 2y+2 * y+2 * y+4* y+4 * yum 109)=2.67yns Speed Up = Execution Time p1 / Execution Time p2 = 1.57 2.26.6 1W? *o \ka whose «Mr E vs a— _ - , Solution 2.39 ‘ - .. C C W) L lngv 9? L 2.39.1 % Wes , ’l 9:; Y “M 5““ 7‘ ‘5;an ﬂ omsmmuxsgmw‘ +|ox§ooxl0ﬁ3x100 KID ""Q n 0721qu memo“ .Hoxsoox(o"+t+*l00>rlo" Q 2.39.2 Answer is no in all cases. Slows down the computer. CCT = clock cycle time a) new CPU *‘wi ’ ’(65‘ SMOWJS iCa : instruction count (arithmetic) (‘0) mm (/90 Mme ': . ‘63 Snow) 9 101s : instructian count (load/store) 1C1) = instruction count (branch) new CPU time r- 015 x 03d 16;: x CPIa x 1.1 x oldCCT + oidlCls x CPIls x 1.1 x oldCCT + oldICb x CPR) x 1.1 x cldCCT The extra dock cycle time adds sufﬁciently to the 126w CPU time such that it is not Wm» the}; : Eamon ' 2.39.3 e0“ EX'Vmivm 3— 106 35% “w (Wimt; .. I ~— M _ Y", 2.39.5 90m Twat, yaw CF33 mm *1 " {lmkm’W 6 \ ‘ >2 ...
View Full Document

{[ snackBarMessage ]}

### Page1 / 4

hw1_sol - Solution 1.4 1.4.1 P2 Class A 105 instr ‘ Class...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online