CS170 Computer Organization and Architecture I - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

CS170 Computer Organization and Architecture I

Description:

A = B op C. Assume memory access takes 4 cycles and a typical operation takes 2 cycles ... Double operation speed. Calculate how many memory accesses are needed first? ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 9
Provided by: ODU5
Learn more at: https://www.cs.odu.edu
Category:

less

Transcript and Presenter's Notes

Title: CS170 Computer Organization and Architecture I


1
CS170 Computer Organization and Architecture I
Ayman Abdel-Hamid Department of Computer
Science Old Dominion University Lecture 8
9/19/2002
2
Outline
  • An example of geometric mean use to summarize
    performance
  • Fallacies and Pitfalls
  • Amdahls Law
  • Using MIPS as a performance Metric
  • Should cover section 2.7

3
Performance Summary Example1/2
Which machine is faster according to total
execution time? And by how much?
Total Execution Time (A) 1482 2266 6206
9954 Total Execution (B) 139 254 690
1083 Machine B is fastest by 9954/1083 9.27
times
4
Performance Summary Example2/2
Which machine is faster by the geometric mean
measure?
  • Remember how SPEC reported performance?
  • Normalize in reference to one machine
  • Choose A as reference machine
  • Obtain Execution time ratios (ET Ratio)
  • ET Ratio(P1) ET(A)/ET(B) 1482/139 10.66
  • ET Ratio (P2) 2266/254 8.92
  • ET Ratio(P3) 6206/690 8.99
  • Geometric Mean (Ratio (P1) Ratio(P2)
    Ratio(P3))1/3
  • Geometric Mean 9.49
  • Machine B is 9.49 times faster than A according
    to geometric mean measure

5
Amdahls Law1/3
Pitfall Expecting the improvement of one aspect
of a machine to increase performance by an amount
proportional to the size of the improvement
Program runs in 100 sec on a machine Multiply
operations responsible for 80 sec of time How
much do we need to improve the speed of
multiplication if program is to run 5 times
faster?
Execution time after improvement (Execution
time affected by improvement/Amount of
improvement Execution time unaffected)
Execution time after improvement 80/n
(100-80) 20 (100/5) 20 80/n 20 ? 80/n 0
? no n can be found to achieve the requested
improvement
Make the common case fast
6
Amdahls Law2/3
Another form of Amdahls Law (to yield
Speedup) Speedup Performance after
improvement/Performance before Speedup
Execution time before/Execution time after
improvement
Assume new hardware added to machine f
fractions of all operations which use new
hardware s speedup of those operations using
new hardware Execution time with new hardware is
Tnew Execution time without new hardware is
Told Tnew f Told/s (1-f) Told Overall
speedup S Told/Tnew Speedup s / (s f (s-1))
7
Amdahls Law3/3
  • Example of memory versus processor speedup
  • A B op C
  • Assume memory access takes 4 cycles and a typical
    operation takes 2 cycles
  • Which of the following achieves the best increase
    in performance
  • Increase memory speed by 50
  • Double operation speed

Option 1 increase memory speed by 50 s1 1.5
(how?) f1 memory access time/ total time
16/18 0.889 S1 1.42 Option 2 double operation
speed s2 2 f2 operation time/total time
2/18 0.111 S2 1.059
Calculate how many memory accesses are needed
first? 1 to get instruction from memory 2 to get
B and C from memory 1 to store result (A) back in
memory Then we need a total of 4 memory access
operations Memory access time 4 (accesses) 4
(cycles/access) 16 cycles Operation time 1
(operation) 2 (cycles/operation) 2
cycles Total number of cycles 16 2 18
8
MIPS as a Performance Metric
  • MIPS is million instructions per second
  • MIPS instruction count / (Execution time 106)
  • Instruction execution rate (instruction/sec)
  • Faster machines have a higher MIPS rating
  • Problems with MIPS
  • Does not take into account capabilities of
    instructions
  • (can not compare computers with different ISA)
  • Varies between programs on the same computer
  • (a machine can not have a single MIPS rating for
    all programs)
  • Can vary inversely with performance
  • Example page 78
Write a Comment
User Comments (0)
About PowerShow.com