1 / 29

Chapter 1

Chapter 1. Computer Abstractions and Technology Part II. CPU Clock and Instructions. Multiplication and division takes more time than addition and subtraction Floating point operations take longer than integer operations Accessing memory takes more time than accessing registers

wirt
Download Presentation

Chapter 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 1 Computer Abstractions and Technology Part II

  2. CPU Clock and Instructions • Multiplication and division takes more time than addition and subtraction • Floating point operations take longer than integer operations • Accessing memory takes more time than accessing registers Important : changing the cycle time often changes the number of cycles required for various instructions Florida A & M University - Department of Computer and Information Sciences

  3. 1st instruction 2nd instruction 3rd instruction ... 4th 5th 6th CPU Clock and Instructions • One could assume that number of clock cycles equals number of instructions, i.e., one clock cycle per instruction: • BUT .. different instructions take different number of cycles. Florida A & M University - Department of Computer and Information Sciences

  4. Cycles Per Instruction (CPI) • Execution time depends on the total number of executed instructions in a program • CPI is the average number of clock cycles each instruction takes to execute • Useful way to compare two different implementations of the same ISA Florida A & M University - Department of Computer and Information Sciences

  5. Instruction Count and CPI • Instruction Count for a program • Determined by program, ISA and compiler • Average clock cycles per instruction • Determined by CPU hardware • Determined by instructions mix Florida A & M University - Department of Computer and Information Sciences

  6. CPI Example 1 • Suppose we have two implementations of the same instruction set architecture (ISA), and some program. • Computer A: clock cycle time = 250ps, CPI = 2.0 Computer B: clock cycle time = 500ps, CPI = 1.2 Which machine is faster for this program? By how much? • Question: If two machines have the same ISA, which quantities (e.g., clock rate, CPI, execution time, #instructions) will always be identical? Florida A & M University - Department of Computer and Information Sciences

  7. CPI Example 1 A is faster… …by this much Florida A & M University - Department of Computer and Information Sciences

  8. same ISA => same #instructions Florida A & M University - Department of Computer and Information Sciences

  9. CPI in More Detail • If different instructions take different numbers of cycles • Counti : number of instructions in class i CPIi : number of cycles per class-i instruction n : number of instruction classes Florida A & M University - Department of Computer and Information Sciences

  10. CPI in More Detail • Weighted average CPI (instruction mix) • Example: • 20% 3 cycle; 50% 4 cycles; 30% 6 cycles • CPI = 3 x 0.20 + 4 x 0.50 + 6 x 0.30 • = 0.6 + 2.0 + 1.8 = 4.4 Relative frequency Florida A & M University - Department of Computer and Information Sciences

  11. CPI Example 2 • A compiler designer is trying to decide between two code sequences for a machine that has three different classes of instructions based on number of clock cycles required to execute. • Analyze: • Which sequence requires more instructions? • Which sequence will be faster? By how much? • What is average CPI for each sequence. Florida A & M University - Department of Computer and Information Sciences

  12. CPI Example 2 • Sequence 1: • IC = 5 • Clock Cycles= 2×1 + 1×2 + 2×3= 10 • Avg. CPI = 10/5 = 2.0 • Sequence 2: • IC = 6 • Clock Cycles= 4×1 + 1×2 + 1×3= 9 • Avg. CPI = 9/6 = 1.5 Florida A & M University - Department of Computer and Information Sciences

  13. Performance Summary • Performance is determined by execution time • Do any of the other variables equal performance? • # of cycles to execute program? • # of instructions in program? • # of cycles per second? • average # of cycles per instruction? • average # of instructions per second? • Common pitfall: thinking one of the variables is indicative of performance when it really isn’t. Florida A & M University - Department of Computer and Information Sciences

  14. Performance Summary • Time is the only complete and reliable measurement • Changing instruction set to lower instruction count may lead to an computer with a slower clock cycle time • Code that executes fewer instructions may not be faster because CPI depends on the type of instructions executed The BIG Picture Florida A & M University - Department of Computer and Information Sciences

  15. Performance Summary • Performance depends on • Algorithm: affects IC, possibly CPI • Programming language: affects IC, CPI • Compiler: affects IC, CPI • Instruction set architecture: affects IC, CPI, Tc The BIG Picture Florida A & M University - Department of Computer and Information Sciences

  16. Power Trends • Rapid slowing due to practical power limit for cooling microprocessors Florida A & M University - Department of Computer and Information Sciences

  17. Power Trends • In CMOS IC technology • Dynamic power • Primary source of power dissipation • Power consumed during switching • Depends on • capacitive loading of each transistor • voltage applied • frequency of transistor switching ×30 ×1000 5V → 1V Florida A & M University - Department of Computer and Information Sciences

  18. Reducing Power • Suppose a new CPU has • 85% of capacitive load of old CPU • 15% voltage and 15% frequency reduction • The power wall • We can’t reduce voltage further • We can’t remove more heat • How else can we improve performance? Florida A & M University - Department of Computer and Information Sciences

  19. Uniprocessor Performance §1.6 The Sea Change: The Switch to Multiprocessors Constrained by power, instruction-level parallelism, memory latency Florida A & M University - Department of Computer and Information Sciences

  20. Multiprocessors • Multicore microprocessors • More than one processor per chip • Requires explicit parallel programming • Compare with instruction level parallelism • Hardware executes multiple instructions at once • Hidden from the programmer • Hard to do • Programming for performance • Load balancing • Optimizing communication and synchronization Florida A & M University - Department of Computer and Information Sciences

  21. SPEC Benchmarks • Programs used to measure performance • Ideally reflects a typical actual workload or expected class of applications (e.g. compiler, graphics) • Standard Performance Evaluation Coop (SPEC) • Mission: Establish, maintain, and endorse a standardized set of relevant benchmarks and metrics for performance evaluation of modern computer systems • Develops benchmarks for CPU, I/O, Web, … Florida A & M University - Department of Computer and Information Sciences

  22. SPEC • SPEC is an umbrella non-profit organization that covers three groups, each with their own benchmarks: • Open Systems Group(OSG) -Component-and system-level benchmarks in an UNIX / NT / VMS environment. • High Performance Group(HPG) -Benchmarking in a numeric computing environment, with emphasis on high-performance numeric computing. • Graphics Performance Characterization Group(GPCG) -Benchmarks for graphical subsystems and OpenGL and Xwindows. Florida A & M University - Department of Computer and Information Sciences

  23. SPEC • SPEC 1989, 1992, 1995 • SPEC CPU2000 – retired February 2007 • SPEC CPU 2006 version 1.0 released August 2006 • SPEC provides benchmark sets for: • graphics • high performance scientific computing - HPC2002, OMP2001, MPI2006 • file systems SPEC - sfs2008 • Web servers and clients - WEB2005 • JAVA client server - jAppServer2004 • Engineering CAD applications Florida A & M University - Department of Computer and Information Sciences

  24. SPEC CPU2006 v1.0 • next-generation, industry-standardized, CPU-intensive benchmark suite • emphasizes performance of the processor (CPU), memory, and compiler • comparative measure of compute-intensive performance across the widest practical range of hardware • source code from real user applications. Florida A & M University - Department of Computer and Information Sciences

  25. SPEC CPU2006 • Two benchmark suites: CINT2006 for measuring compute-intensive integer performance, and CFP2006 for compute-intensive floating point performance • CINT2006 suite includes 12 application-based benchmarks written in C and C++ • CFP2006 includes 17 CPU-intensive benchmarks written in C, C++, Fortran, and a mixture of C and Fortran Florida A & M University - Department of Computer and Information Sciences

  26. SPEC CPU Benchmark • SPEC CPU2006 • Elapsed time to execute a collection/mix of programs • Negligible I/O, so focuses on CPU performance • Normalize relative to reference machine • Summarize as geometric mean of performance ratios Florida A & M University - Department of Computer and Information Sciences

  27. CINT2006 for Opteron X4 2356 SPECratio is inversely proportional to execution time Florida A & M University - Department of Computer and Information Sciences

  28. SPEC Power Benchmark • Power consumption of server at different workload levels • Performance: ssj_ops/sec • Power: Watts (Joules/sec) Florida A & M University - Department of Computer and Information Sciences

  29. Concluding Remarks • Cost/performance is improving • Due to underlying technology development • Hierarchical layers of abstraction • In both hardware and software • Instruction set architecture • The hardware/software interface • Execution time: the best performance measure • Power is a limiting factor • Use parallelism to improve performance Florida A & M University - Department of Computer and Information Sciences

More Related