0% found this document useful (0 votes)
22 views

Computer Architecture 2

The document discusses computer performance metrics like response time and throughput, and how performance is determined by factors like processor speed, number of processors, clock cycle time, clock rate, instructions per cycle (CPI), and time spent in user programs versus operating system. It provides examples to illustrate how to calculate performance improvements from changing these factors, such as increasing clock rate or decreasing clock cycle time. Key metrics discussed include execution time, clock cycles, CPI, and their relationships to measuring and improving system and CPU performance.

Uploaded by

Hassan Asghar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Computer Architecture 2

The document discusses computer performance metrics like response time and throughput, and how performance is determined by factors like processor speed, number of processors, clock cycle time, clock rate, instructions per cycle (CPI), and time spent in user programs versus operating system. It provides examples to illustrate how to calculate performance improvements from changing these factors, such as increasing clock rate or decreasing clock cycle time. Key metrics discussed include execution time, clock cycles, CPI, and their relationships to measuring and improving system and CPU performance.

Uploaded by

Hassan Asghar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Computer Architecture

Lecture 2
Performance
Defining Performance
• How will you grade one computer better in
performance than the other?
• PCs and Embedded computers
– Response Time
• The time between the start and completion of a task. Includes disk
access, memory access, I/O activities, operating system overhead,
CPU execution time
• Servers
– Throughput( or Bandwidth)
• Number of tasks completed per unit time.
Check Yourself
• Do the following changes to a computer
system increase throughput, decrease
response time, or both?
– Replacing the processor in a computer with a
faster version.
– Adding additional processors to a system that uses
multiple processors for separate tasks—for
example, searching the web
Performance (Response Time)
•  
• Performace = 1 / Execution Time
• = =n

• A is ‘n’ times Faster than B


User CPU Time
• The response time a user experiences also
includes time where OS is sharing CPU for other
programs, and the waiting time for I/O.
• CPU Execution Time is the time spent working
only for the particular task.
• CPU Execution Time
– User CPU Time: Time Spent in the Program
– System CPU Time: Time spent in operating system
working on behalf of program.
System Performance/CPU Performance

• System
  Performance =
• CPU Performance(Our Focus) =
Example 1
• If computer A runs a program in 10 seconds
and computer B runs the same program in 15
seconds, how much faster is A than B?
CPU Execution Time and Clock Cycle

•  CPU execution time for a program


= CPU clock cycles * Clock Cycle Time
For a program
• CPU execution time for a program
=
Since clock rate =
Improving Performance
• Decrease clock cycle time
Or
• Decreased no of clock cycles required by a
program
Decreasing clock cycle time may increase no. of
clock cycles required by a program
Example 2
• Our favorite program runs in 10 seconds on computer
A, which has a 2 GHz clock. We are trying to help a
computer designer build a computer, B, which will run
this program in 6 seconds. The designer has
determined that a substantial increase in the clock rate
is possible, but this increase will affect the rest of the
CPU design, causing computer B to require 1.2 times
as many clock cycles as computer A for this program.
What clock rate should we tell the designer to target?
Instruction Performance
• Clock cycle per instruction abbreviated as CPI
is the average no of clock cycles required by
instruction since each instruction may take
different no of clock cycles.
Example 3
• Suppose we have two implementations of the
same instruction set architecture. Computer A
has a clock cycle time of 250 ps and a CPI of
2.0 for some program, and computer B has a
clock cycle time of 500 ps and a CPI of 1.2 for
the same program. Which computer is faster
for this program and by how much ?
Classic CPU Performance Equation
Example 4
How to determine the Values
• CPU Execution Time: By running the program
• Clock Cycle Time: Computer Documentation
• Instruction Count: By knowing the ISA. Using
architecture simulator. Does not depend upon
hardware details
• CPI: Depends upon the hardware details
Factors Effecting performance
Check Yourself

You might also like