Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1 Computer Abstractions and Technology Part II.

Similar presentations


Presentation on theme: "Chapter 1 Computer Abstractions and Technology Part II."— Presentation transcript:

1 Chapter 1 Computer Abstractions and Technology Part II

2 Florida A & M University - Department of Computer and Information Sciences 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

3 Florida A & M University - Department of Computer and Information Sciences 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. 1st instruction2nd instruction3rd instruction4th 5th6th...

4 Florida A & M University - Department of Computer and Information Sciences 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

5 Florida A & M University - Department of Computer and Information Sciences 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

6 Florida A & M University - Department of Computer and Information Sciences 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?

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

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 Count i : number of instructions in class i CPI i : number of cycles per class-i instruction n : number of instruction classes

10 Florida A & M University - Department of Computer and Information Sciences CPI in More Detail Relative frequency 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

11 Florida A & M University - Department of Computer and Information Sciences 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.

12 Florida A & M University - Department of Computer and Information Sciences CPI Example 2 ClassABC CPI for class123 IC in sequence 1212 IC in sequence 2411 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

13 Florida A & M University - Department of Computer and Information Sciences 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.

14 Florida A & M University - Department of Computer and Information Sciences 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

15 Florida A & M University - Department of Computer and Information Sciences 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, T c The BIG Picture

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

17 Florida A & M University - Department of Computer and Information Sciences 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 ×1000 ×30 5V → 1V

18 Florida A & M University - Department of Computer and Information Sciences 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?

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

20 Florida A & M University - Department of Computer and Information Sciences 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

21 Florida A & M University - Department of Computer and Information Sciences 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, …

22 Florida A & M University - Department of Computer and Information Sciences 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.

23 Florida A & M University - Department of Computer and Information Sciences 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

24 Florida A & M University - Department of Computer and Information Sciences 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.

25 Florida A & M University - Department of Computer and Information Sciences 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

26 Florida A & M University - Department of Computer and Information Sciences 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

27 Florida A & M University - Department of Computer and Information Sciences CINT2006 for Opteron X4 2356 NameDescriptionIC×10 9 CPITc (ns)Exec timeRef timeSPECratio perlInterpreted string processing2,1180.750.406379,77715.3 bzip2Block-sorting compression2,3890.850.408179,65011.8 gccGNU C Compiler1,0501.720.47248,05011.1 mcfCombinatorial optimization33610.000.401,3459,1206.8 goGo game (AI)1,6581.090.4072110,49014.6 hmmerSearch gene sequence2,7830.800.408909,33010.5 sjengChess game (AI)2,1760.960.483712,10014.5 libquantumQuantum computer simulation1,6231.610.401,04720,72019.8 h264avcVideo compression3,1020.800.4099322,13022.3 omnetppDiscrete event simulation5872.940.406906,2509.1 astarGames/path finding1,0821.790.407737,0209.1 xalancbmkXML parsing1,0582.700.401,1436,9006.0 Geometric mean 11.7 SPECratio is inversely proportional to execution time

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

29 Florida A & M University - Department of Computer and Information Sciences 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


Download ppt "Chapter 1 Computer Abstractions and Technology Part II."

Similar presentations


Ads by Google