Assn6Sol - CDA 3101 Assignment 6 Due in class on Thursday...

This preview shows page 1. Sign up to view the full content.

CDA 3101 Assignment 6 Due in class on Thursday, Nov. 2 1. Problem 4.7 from the textbook . a. Time = (Seconds/cycle) * (Cycles/instruction) * (Number of instructions) Therefore the expected CPU time is (1 second/(5*10 9 )cycles) * (0.8cycles/instruction) * (7.5 * 10 9 instructions) = 1.2 seconds b. P received 1.2 seconds/3 seconds or 40% of the total CPU time. 2. Problem 4.9 from the textbook . The average CPI of P1 is (1 2 + 2 + 3 + 4 + 3)/6 = 7/3. The average CPI ofP2 is (2 2 + 2 + 2 + 4 + 4)/6 = 8/3. P2 then is ((6 10 9 cycles/second)/(8/3 cycles/instruction))/((4 10 9 cycles/second)/(7/3cycles/instruction)) = 21/16 times faster than P1 3. Problem 4.11 from the textbook . Program P running on machine M takes (10 9 cycles/seconds) * 10 seconds =10 10 cycles. P’ takes (10 9 cycles/seconds) * 9 seconds = 9 10 9 cycles. This leaves 10 9 less cycles after the optimization. Every time we replace a mult with two adds, it takes 4 – 2 * 1 = 2 cycles less per replacement. Thus, there must have been 10
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online