0% found this document useful (0 votes)
20 views16 pages

05 Performance

This document discusses computer architecture performance. It defines key performance metrics like response time and throughput. It explains how performance is determined by algorithms, programming languages, computer architecture, processors and memory systems. It also discusses measuring CPU time and how instruction count and cycles per instruction affect performance.

Uploaded by

sanjanamooli77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views16 pages

05 Performance

This document discusses computer architecture performance. It defines key performance metrics like response time and throughput. It explains how performance is determined by algorithms, programming languages, computer architecture, processors and memory systems. It also discusses measuring CPU time and how instruction count and cycles per instruction affect performance.

Uploaded by

sanjanamooli77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

CS209 Computer Architecture

Performance
Somanath Tripathy
IIT Patna
This Class
• Performance Measure
Instruction Cycle with Interrupts
Program Flow Control
Program Timing
Instruction Cycle (with Interrupts) -
State Diagram
• Performance
Performance Growth In Perspective
• Dramatic Change in Technology
– Processor
• 2X in performance every 1.5 years; 1000X
performance in last decade (Moore’s Law)
– Main Memory
• DRAM capacity: 2x / 2 years; 1000X size in
last decade
• Cost/bit: improves about 25% per year
– Disk
• capacity: > 2X in size every 1.5 years
• Cost/bit: improves about 60% per year
Understanding Performance
• Algorithm
– Determines number of operations executed
• Programming language, compiler, architecture
– Determine number of machine instructions
executed per operation
• Processor and memory system
– Determine number of clock cycles per machine
instructions to be executed
• I/O system (including OS)
– Determine number of clock cycles per I/O
operations to be executed
Defining Performance
Consider 2 buses
Vehicle Max Capacity Avg. Speed
Bus1 60 Passengers 50kmph
Bus2 40 Passengers 60kmph

Destination: 300kms

Which Bus has the best performance?


Response Time and Throughput
• Response time
– How long it takes to do a task
• Throughput
– Total work done per unit time
• e.g., tasks/transactions/… per hour
• Response time and throughput are affected by
– Replacing the processor with a faster version?
– Adding more processors?

• We’ll focus on response time for now…


Relative Performance
• Performance = 1/Execution Time
• “X is n time faster than Y”
Performanc e X Performanc e Y
= Execution time Y Execution time X = n

◼ Example: time taken to run a program


◼ 10s on A, 15s on B

◼ So A is ? times faster than B 1.5


Measuring CPU Time
• CPU Time: Time spent in processing a given job

CPU Time = CPU Clock Cycles  Clock Cycle Time


CPU Clock Cycles
=
Clock Rate
• Performance improved by
– Reducing number of clock cycles (good
algorithm or hardware design)
– Increasing clock rate (good technology)
– Hardware designer must often trade off clock
rate against cycle count
Instruction Count and CPI
Clock Cycles = Instruction Count  Cycles per Instruction
CPU Time = Instruction Count  CPI  Clock Cycle Time
Instruction Count  CPI
=
Clock Rate
• Instruction Count for a program
– Determined by program, ISA and compiler
• Average cycles per instruction
– Determined by CPU hardware
– If different instructions have different CPI
• Average CPI affected by instruction mix
CPI Example
• Computer A: Cycle Time = 250ps, CPI = 2.0
• Computer B: Cycle Time = 500ps, CPI = 1.2
• Same ISA
• Which is faster, and by how much?
CPU Time = Instruction Count  CPI  Cycle Time
A A A
= I  2.0  250ps = I  500ps A is faster…

CPU Time = Instruction Count  CPI  Cycle Time


B B B
= I  1.2  500ps = I  600ps

B = I  600ps = 1.2
CPU Time
…by this much
CPU Time I  500ps
A
Thanks

You might also like