Brown EN 164 - Lecture 2: Metrics

Unformatted text preview:

1Computer System DesignLecture 2: MetricsProf. R. Iris BaharEN164January 29, 2007Reading: 1.1-1.5EN164Lecture 1-2Website is up• You can find course information at the following web location:• http://www.lems.brown.edu/cad/courses/EN164EN164Lecture 1-6Course Scope• INSTRUCTION SET ARCHITECTURE (ISA)–programmer/compiler view - “Functional appearance to its immediate user/system programmer”• IMPLEMENTATION (microarchitecture)–processor designer view - “Logical structure or organization that performs the architecture”• REALIZATION (Chip)–chip/system designer view - “Physical structure that embodies the implementation”EN164Lecture 1-7Instruction Set Architecture• ISA, the boundary between software and hardware–Specifies the logical machine that is visible to the programmer– Also, a functional specification for the processor designers• What needs to be specified by an ISA–Operations• what to perform and what to perform next– Temporary Operand Storage in the CPU• accumulator, stacks, registers– Number of operands per instruction– Operand location• where and how to specify the operands– Type and size of operands– Instruction-to-Binary EncodingEN164Lecture 1-8Dynamic-Static InterfaceDSI = ISA = a contract between the program and the machine.EN164Lecture 1-11Computer Blocks• CPU (Central Processing Unit)• ALU (Arithmetic and Logic Unit): calculations• Register unit: data, memory addresses• Control unit: control of the whole computer• Memory: data, programs• I/O unit: communication with the surroundings2EN164Lecture 1-12The Generic Instruction Cycle• Instructions are typically processed in a pipelined fashion:1. Instruction Fetch (IF)2. Instruction Decode (ID)3. Operand(s) Fetch (OF)4. Instruction Execution (EX)5. Operand Store (OS)6. Update Program Counter (PC)EN164Lecture 1-13Evaluating Performance• The same instruction set architecture may be implemented in hardware using either simple or very complex pipelining strategies.• A simple pipelined approach may be used to implement two different instruction set. • How can we compare different designs? How can we determine which approach is better?OREN164Lecture 1-14• How should we measure, report, and summarize performance?• What factors determine the performance of a computer?• Critical to purchase and design decisions–best performance?– least cost?– best performance/cost?• Questions:–Why is some hardware better than others for different programs?– What factors of system performance are hardware related?(e.g., Do we need a new machine, or a new operating system?)– How does the machine's instruction set affect performance?PerformanceEN164Lecture 1-17Execution Time• Elapsed Time, wall-clock time or response time–counts everything (disk and memory accesses, I/O , etc.)– a useful number, but often not good for comparison purposes• CPU time–doesn't count I/O or time spent running other programs– can be broken up into system time, and user time• Our focus: user CPU time –time spent executing the lines of code that are "in" our programEN164Lecture 1-18Measuring Performance• CPU time = clock cycle time x cycles per instruction x number of instructions• Influencing factors for each:–clock cycle time: technology and organization– CPI: organization and instruction set design– instruction count: instruction set design and compiler• CPI (cycles per instruction) or IPC (instructions per cycle) cannot be accurately estimated analytically–Typically determined empiricallyEN164Lecture 1-21Different numbers of cycles for different instructions• Multiplication takes more time than addition• Floating point operations take longer than integer ones• Accessing memory takes more time than accessing registers• Changing the cycle time often changes the number of cycles required for various instructions–e.g. memory operations spend time, not cycles• Another point: the same instruction might require a different number of cycles on a different machine–circuits have been implemented in different ways3EN164Lecture 1-23• A program runs in 10 seconds on computer A, which has a 400 MHz clock. We are trying to help a computer designer build a new machine B, that will run this program in 6 seconds. The designer can use new technology to substantially increase the clock rate, but this increase will affect the rest of the CPU design, causing machine B to require 1.2 times as many clock cycles as machine A. What clock rate should we tell the designer to target?”Clock cyclesA= 10 s *400 MHz = 4*109cyclesClock cyclesB= 1.2 * 4*109cycles = 4.8 *109cyclesExecution time = # of clock cycles * cycle timeClock rateB= Clock cyclesB/ Execution timeB= 4.8 *109cycles / 6 s = 800 MHzExampleEN164Lecture 1-26Performance• Performance is determined by execution time• Related variables–# 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


View Full Document

Brown EN 164 - Lecture 2: Metrics

Download Lecture 2: Metrics
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 2: Metrics and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 2: Metrics 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?