Quiz4Sol - 8 instr x(3 cycles instr x(10-9 seconds cycle =...

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

View Full Document Right Arrow Icon
CDA3101 Quiz 4 Last Name ____________________ Spring 2008 First Name ____________________ Time: 10 minutes 1. (6 points) Suppose a program (running on a MIPS processor) has the following distribution of instruction types. 10% Floating point CPI = 2 20% Integer CPI = 1 20% Load/Store CPI = 3 50% Branches CPI = 4 What is the effective CPI for this program? If this program had 500 million instructions and ran on a 1GHz computer, how long would it take (in seconds)? Effective CPI = 0.1(2) + 0.2(1) + 0.2(3) + 0.5(4) = 0.2 + 0.2 + 0.6 + 2 = 3 CPI CPU Time = (5x10
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 8 instr) x (3 cycles / instr) x (10-9 seconds / cycle) = 1.5 seconds 2. (4 points) Suppose we enhance a computer to make all floating-point instructions run five times faster. Let’s look at how speedup behaves when we incorporate the faster floating-point hardware. If the execution time of some benchmark before the floating-point enhancement is 10 seconds, what will the speedup be if half of the 10 seconds is spent executing floating-point instructions? Amdahl’s law: Time taken after enhancement = (5/5) + 5 = 6 seconds Speedup = 10/6...
View Full Document

Ask a homework question - tutors are online