0% found this document useful (0 votes)
91 views5 pages

CPU Performance Evaluation Guide

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

CPU Performance Evaluation Guide

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

Class Assignment #3 | SP21-BCS-022

Microprocessor and Assembly


Language

CLASS ASSIGNMENT # 3

Submitted by

H Ahsan ullah Farooqi


SP21-BCS-022
BCS 6A

Submitted TO:
MR: TAIMUR SHAHZAD

DEPARTMENT OF COMPUTER SCIENCE


COMSATS UNIVERSITY ISLAMABAD

Page 1 of 5
Class Assignment #3 | SP21-BCS-022

QUESTION-1

How CPU performance is evaluated? Discuss performance evaluations tools of


CPU briefly along with their equations and appropriate examples.

Answer:

CPU performance is a critical aspect of a computer system, and it is evaluated using


various metrics and tools. Here are some commonly used performance evaluation
tools and metrics for CPUs:

1) Clock Speed (Frequency):


Equation: Performance = Clock Speed (in Hz) / Cycles per Instruction (CPI)
Clock speed represents how many cycles a CPU can execute in a second. Higher
clock speeds generally result in better performance.
Example: A CPU with a clock speed of 3 GHz can execute 3 billion cycles per
second.

2) Instructions Per Cycle (IPC):


Equation: IPC = Instructions Executed / Cycles Executed
IPC measures how many instructions are executed per clock cycle. Higher IPC values
indicate better performance.
Example: If a CPU executes 4 instructions in 2 cycles, the IPC would be 2.

3) Throughput:
Equation: Throughput = Instructions per Second
Throughput measures the number of instructions a CPU can execute in one second.
Example: If a CPU executes 2 billion instructions per second, its throughput is 2 GHz.

4) CPI (Cycles Per Instruction):


Equation: CPI = Total Cycles / Total Instructions
CPI represents the average number of clock cycles per instruction. Lower CPI values
indicate better performance.
Example: If a CPU executes 5000 cycles for 1000 instructions, the CPI is 5.

5) Execution Time (Elapsed Time):


Equation: Execution Time = (Number of Instructions) * CPI * Clock Cycle Time
Execution time represents the total time taken to execute a program. Lower execution
times indicate better performance.
Example: If a program has 1000 instructions, CPI is 2, and clock cycle time is 0.5 ns,
the execution time is 1000 * 2 * 0.5 ns = 1000 ns.

Page 2 of 5
Class Assignment #3 | SP21-BCS-022

6) MIPS (Million Instructions Per Second) and MFLOPS (Million Floating-


Point Operations Per Second):
Equations:
MIPS = (Number of Instructions) / (Execution Time) * 10^6
MFLOPS = (Number of Floating-Point Operations) / (Execution Time) * 10^6
MIPS and MFLOPS are used to measure the rate of instruction and floating-point
operation execution, respectively.

7) Benchmarking Tools:
Tools like SPEC (Standard Performance Evaluation Corporation) benchmarks are
widely used to evaluate the performance of CPUs by running standardized sets of
programs and measuring their execution times

Page 3 of 5
Class Assignment #3 | SP21-BCS-022

QUESTION-2

Define system performance. Explain important parameters that are used to


measure the system performance theoretically and mathematically.

System Performance:
System performance refers to the overall effectiveness of a computer system. Key
parameters for measurement include:

 Throughput:
Formula: Throughput = Completed Tasks / Time
Example: 1000 tasks/hour.

 Response Time:
Formula: Response Time = Completion Time - Request Time
Example: 5 seconds for web page loading.

 Execution Time:
Formula: Execution Time = Completion Time - Start Time
Example: 30 minutes for a program.

 Scalability:
Formula: Scalability = Performance with 'n' Resources / Performance with 'm'
Resources
Example: Scalability of 2 with 4 CPUs.

 Utilization:
Formula: Utilization = (Time Busy / Total Time) * 100
Example: 80% CPU utilization.

 Efficiency:
Formula: Efficiency = (Useful Work Output / Total Input) * 100
Example: 80% efficiency in energy usage.

 Reliability and Availability:


Formula: Availability = (Uptime / Total Time) * 100
Example: 900 operational hours in a 30-day month.

Page 4 of 5
Class Assignment #3 | SP21-BCS-022

QUESTION-3

Suppose that when Program A is run, the user CPU time is 3 seconds, the
elapsed wall clock time is 4 seconds, and the system performance is 10
MFLOP/sec. Assume that there are no other processes taking any significant
amount of time, and the computer is either doing calculations in the CPU, or
doing I/O, but it can't do both at the same time. We are now replacing the
processor with one that runs six times faster but doesn't affect the I/O speed.
What will the user CPU time, the wall clock time, and the MFLOP/sec
performance be now?

CPU performanceB/CPU performanceA = CPU timeA/CPU timeB

6 = 3/CPU timeB

User CPU Time = .5 seconds

Since the I/O time is unaffected by the performance increase, it still takes 1 second to
do I/O. Therefore it takes 1 + .5 = 1.5 seconds to run Program A on the faster CPU

Wallclock Time = 1.5 seconds

System Performance in MFLOPS = Number of Floating Point Operations *


106/Wallclock Time

Old System Performance (10) = #FLOP * 106/4

#FLOP = 40 * 106

New System Performance = 40 * 106/1.5

MFLOP/sec = 26.667

Page 5 of 5

You might also like