Upload
others
View
14
Download
0
Embed Size (px)
Citation preview
ECE260: Fundamentals of Computer Engineering
James Moscola Dept. of Engineering & Computer Science York College of Pennsylvania
ECE260: Fundamentals of Computer Engineering
Based on Computer Organization and Design, 5th Edition by Patterson & Hennessy
Technologies & Performance
ECE260: Fundamentals of Computer Engineering
Technology Trends• Electronics technology continues to evolve rapidly
• Increased capacity and performance (i.e. larger and faster)
• Reduced cost
2
DRAM Capacity
ECE260: Fundamentals of Computer Engineering
Semiconductor Technology• Silicon is a semiconductor
• Does not conduct electricity well
• Used as the base material for integrated circuits (ICs)
• Can add various materials to silicon to modify its properties
• Conductors (i.e. wires)
• Insulators
• Switches (i.e. transistors)
3
ECE260: Fundamentals of Computer Engineering
Intel Core i7 Wafer• 300mm wafer, 280 processor dies, 32nm technology
• Each chip is 20.7 x 10.5 mm
5
ECE260: Fundamentals of Computer Engineering
Integrated Circuit Cost• Wafer cost and area are fixed
• Defect rate is determined by manufacturing process
• Die area determined by architecture, circuit design, and process technology
• Yield — proportion of working dies per wafer
6
Cost per die = Cost per wafer
Dies per wafer × Yield
Yield = 1
(1 + (Defects per area × Die area/2))2
Dies per wafer ≈Wafer area
Die area
ECE260: Fundamentals of Computer Engineering
Defining Performance can be Challenging • Which airplane has the best performance?
7
0 100 200 300 400 500
DouglasDC-8-50
BAC/SudConcorde
Boeing 747
Boeing 777
Passenger Capacity
0 2000 4000 6000 8000 10000
Douglas DC-8-50
BAC/SudConcorde
Boeing 747
Boeing 777
Cruising Range (miles)
0 500 1000 1500
DouglasDC-8-50
BAC/SudConcorde
Boeing 747
Boeing 777
Cruising Speed (mph)
0 100000 200000 300000 400000
Douglas DC-8-50
BAC/SudConcorde
Boeing 747
Boeing 777
Passengers x mph
ECE260: Fundamentals of Computer Engineering
Response Time and Throughput• Multiple different measures of computing performance
• Response time (a.k.a. execution time) <= this will be our primary focus for now
• Time to complete a task
• Throughput
• Total work done per unit time (e.g. tasks/hour)
• How are response time and throughput affected by:
• Replacing the processor with a faster version?
• Both are improved since each task can be done faster thus allowing more tasks to get completed
• Adding more processors?
• Only throughput increases since more tasks can be done simultaneously, but no single task is faster
8
ECE260: Fundamentals of Computer Engineering
Defining Performance• Define performance in terms of execution time
• The smaller the execution time, the higher the performance
• Comparing performance between systems
• Performance of SystemX is greater than performance of SystemY
• Quantifying the relative performance
• SystemX is n times faster than SystemY
• Example: time taken to run a program
• 10s on SystemA, 15s on SystemB
• SystemA is 1.5 times faster than SystemB
9
PerformanceX = 1ExecutionTimeX
PerformanceX > PerformanceY
1>
1ExecutionTimeX ExecutionTimeY
PerformanceX = n
PerformanceY
PerformanceA =
ExecutionTimeB= n
PerformanceB ExecutionTimeA
15s= 1.5
10s
ECE260: Fundamentals of Computer Engineering
Measuring Performance• Program time can be measure in different ways:
• Elapsed time
• Total response/execution time (as if measured with a stopwatch)
• Includes: processing, I/O, operating system overhead, idle time, etc.
• Not a great measure since your computer is typically busy with more than one task
• CPU time
• Time spent processing a specific task
• Does NOT include: I/O, operating system overhead, idle time, etc.
• Comprises User CPU time + System CPU time
• User CPU time is time spent in program
• System CPU time is time spent in operating system doing tasks related to user program
10
ECE260: Fundamentals of Computer Engineering
CPU Clocking• Operation of digital hardware governed by a constant-rate clock
• Clock period: duration of a clock cycle as measured in seconds
• e.g., 250ps = 0.25ns = 250×10–12s
• Clock frequency (rate): cycles per second
• e.g., 4.0GHz = 4000MHz = 4.0×109Hz
11
1= Clock Frequency
Clock Period
1= Clock Period
Clock Frequency
ECE260: Fundamentals of Computer Engineering
CPU Time• Relating CPU Time, CPU cycles for a program, and clock cycle time (a.k.a. clock period)
• To improve performance, reduce CPU Time
• Reduce CPU Time by:
• Reducing number of clock cycles
• Increasing clock rate
12
CPU Time = CPU Clock Cycles × Clock Cycle
Time
CPU Time =CPU Clock Cycles
Clock Frequency (i.e. rate)
ECE260: Fundamentals of Computer Engineering
CPU Time Example• Existing computer called ComputerA has a 2GHz clock rate and completes a program in 10 seconds
• CPU TimeA = 10s, Clock RateA = 2GHz, Clock CyclesA = <not given, but easy to calculate>
• Goal: Design a new computer, ComputerB, that can run same program in 6 seconds
• Increasing clock rate will require 1.2 times as many clock cycles as ComputerA
• What clock rate should be specified for ComputerB?
13
Clock RateB =Clock CyclesB
=1.2 × Clock CyclesA
CPU TimeB 6s
Clock CyclesA = CPU TimeA × Clock RateA
Clock CyclesA = 10s × 2×109 Hz
Clock CyclesA = 20×109 cycles
Clock RateB =Clock CyclesB
=1.2 × 20×109 cycles
= 4GHzCPU TimeB 6s
ECE260: Fundamentals of Computer Engineering
Instruction Count and Performance• Instruction count for a program is the number
of instructions executed to run the program
• Determined by program logic, the Instruction Set Architecture (ISA), and the compiler
• Different instructions may require different number of clock cycles
• ADD, SUBTRACT, SHIFT ==> 1 clock cycle
• MULTIPLY ==> 4 clock cycles
• Execution time can be computed as
• Average clock cycles per instruction (CPI)
• Determined by CPU hardware
• If different instructions have different CPI then average CPI is affected by instruction mix
14
CPU Clock Cycles =
Instructions for program (i.e. count)
×Average Clock
Cycles per Instruction (CPI)
ECE260: Fundamentals of Computer Engineering
Instruction Count and Performance• Recall:
• Thus, using:
• We can rewrite CPU Time as:
15
CPU Clock Cycles =
Instructions for program (i.e. count)
×Average Clock
Cycles per Instruction (CPI)
CPU Time =Instructions for program (i.e. count)
×Average Clock
Cycles per Instruction (CPI)
× Clock Cycle Time
CPU Time = CPU Clock Cycles × Clock Cycle
Time
ECE260: Fundamentals of Computer Engineering
Instruction Count and Performance• Furthermore:
• Can also be written as:
16
CPU Time =Instructions for program (i.e. count)
×Average Clock
Cycles per Instruction (CPI)
× Clock Cycle Time
CPU Time =Instruction Count × CPI
Clock Frequency (i.e. rate)
ECE260: Fundamentals of Computer Engineering
CPI Example• Given two Computers that implement some program using the same ISA
• ComputerA: Cycle Time = 250ps, CPI = 2.0
• ComputerB: Cycle Time = 500ps, CPI = 1.2
• Which computer is faster, and by how much?
• First, determine the CPU Time for each computer using the following equation where
17
CPU Time = CPU Clock Cycles × Clock Cycle
Time
CPU Clock Cycles =
Instructions for program (i.e. count)
×Average Clock
Cycles per Instruction (CPI)
ECE260: Fundamentals of Computer Engineering
CPI Example (Continued)• Compute CPU Time for each
• Which is faster?
• ComputerA is 1.2 times faster than ComputerB
18
CPU TimeA = Instruction Count × CPIA × Clock Cycle TimeA
CPU TimeA = Instruction Count × 2.0 × 250ps
CPU TimeA = Instruction Count × 500ps
CPU TimeB = Instruction Count × CPIB × Clock Cycle TimeB
CPU TimeB = Instruction Count × 1.2 × 500ps
CPU TimeB = Instruction Count × 600ps
CPU PerformanceA=
CPU TimeB=
Instruction Count × 600ps= 1.2
CPU PerformanceB CPU TimeA Instruction Count × 500ps
ECE260: Fundamentals of Computer Engineering
Power Trends• Clock rate and power requirements increased rapidly for many years
• In PostPC era, we are interested in reducing power requirements to conserve battery life
19
ECE260: Fundamentals of Computer Engineering
Power Trends• In modern integrated circuits, primary source of energy consumption is dynamic energy
• Dynamic energy is consumed when transistors switch states (i.e. 0 → 1 or 1 → 0)
• The dynamic power requirements are dependent on the dynamic energy and the frequency at which transistors switch states
20
Power ∝ 1/2 × Capacitive Load × Voltage2 × Frequency Switched
ECE260: Fundamentals of Computer Engineering
Reducing Power Example• Developed a new CPU with the following features
• 85% of capacitive load of old CPU
• 15% voltage reduction and 15% frequency reduction
• What is the impact on dynamic power?
• Use the following power equation
• The new CPU uses about half the power of the old CPU
21
PowerNew=
(CapacitiveLoadOld × 0.85) × (VoltageOld × 0.85)2 × (FrequencySwitchedOld × 0.85)= 0.854 = 0.52
PowerOld CapacitiveLoadOld × VoltageOld2 × FrequencySwitchedOld
Power ∝ 1/2 × Capacitive Load × Voltage2 × Frequency Switched