CPSC 330 - Spring 2008
Homework 6
Due on Friday, April 25
[Revised 4/22 with added examples]
Example:
Consider enhancing a scalar machine by providing a vector mode, which
is 4 times faster than the normal mode of operation.
(a) If the percentage of vectorization is 25%, what is the overall
speedup?
1 1 1
speedup = ----------------- = ---------- = ----- = 16/13 = 1.23
(1-1/4) + (1/4)/4 3/4 + 1/16 13/16
(b) What percent of vectorization is needed to achieve an overall
speedup of 2?
1
2 = ------------- => (1-f) + (f/4) = 1/2
(1-f) + (f/4)
=> 4-4f+f = 2
=> -3f = -2
=> f = 2/3 so % vectorization needed is 67%
1. Consider an enhancement to a computer system that provides an eight times
speedup when in use. What is the overall speedup if the enhancement can
only be used for one half of a program's normal execution time? Show the
result as a fraction.
2. What fraction of normal execution time must the 8x enhancement be used to
achieve an overall speedup of 4? Show the result as a fraction.
Example:
Consider a program that executes 100 million instructions in 5 seconds.
What is the MIPS rating for this program?
100*10^6 insts
MIPS = -------------- = 20 MIPS
5 secs * 10^6
Consider a processor with a CPI value of 10 cycles/inst. and a clock
frequency of 200 MHz. What is the MIPS rating for this processor?
200 M cycles/sec
MIPS = --------------------- = 20 MIPS
10 cycles/inst * 10^6
3. A program executes 10 billion instructions on a processor with an avg. CPI
of 2.0 and a clock frequency of 4 GHz. What is the MIPS value?
a) show the calculation by first determining exection time, then
dividing number of instructions by execution time
b) show the calculation by the MIPS formula that does not include
the instruction count.