• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/18

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

18 Cards in this Set

  • Front
  • Back

Performance

1 / Execution time

Two methods of calculating execution time for multi-testing programs.



Average of execution times


Weighted average

Amdahl's Law

A fundamental law used to quantify performance improvements in computer design.

Speed up

Performance with enchancment /
Performance without enchancement

OR

execution time without enchancement /
execution time with enchancement




speedup >= 1

Fractional Enhancement

fraction of thecomputation time in the original machine thatcan be converted to take advantage of theenhancement.




FE <= 1




Example:
An original program takes 60 secs as execution time,and within the total 60 secs, only 20 secs of theprogram can be enhanced. Therefore, FE = 20/60

What is speedup enhancement (SE)?

How much faster the program would run if the enhanced mode was used for the entire program



SE >= 1




Example:
If an enhanced mode takes 2 secs for a program thatrequires 20 secs without the enhanced mode,then SE = 20/2=10

How do you calculate the new execution time?

ET(new) = ET(old) x [(1-FE) + FE/SE]



How do you calculate the overall speedup?

ET(old)/ET(new) = 1/ (1 - FE) + FE/SE

Example


A CPU is usable 40% of the total execution time;• The enhanced CPU runs 10 times faster;


• What is the overall speedup of the new machine?FE = 0.4, SE = 10

1 / (1-0.4) + 0.4/10

Speedup = 1.56


CPU time

CPU clock cycles for a program / clock rate

CPI:

CPU clock cycles for a program / IC

Clock rate

1/clock cycle time

CPU time

IC x CPI / clock rate

OR



IC x CPI x clock cycle time

What three things is CPU performance dependant on?

- Clock rate
Hardware technology and organisation
- CPI
Organisational an instruction set architecture
- IC
Instruction set architecture and compiler technology

Total CPU clock cycles

SUMOF = CPI x IC

Instruction count

CPI = (SUMOF CPI x IC) / IC

Considering two alternatives for conditional branchinstructions

CPU A: a condition code is set by a compare instruction; abranch tests the condition code.

- CPU B: a compare instruction is included in the branch
- Known: conditional branch takes 2 cycles on both CPUs; allother instructions take 1 cycle. To CPU A, 20% of allinstructions are conditional branches.




- Suppose: clock cycle time of CPU A is (1) 1.25 times faster (2)1.1 times faster than that of CPU B.

CPI(a) = (0.2 x 2) + (0.8 x 1) / 1= 1.2
CPU time(a) = IC(a) x 1.2 x clock cycle time