COAL - Week 5 - Chap 2 (William Stallings)
COAL - Week 5 - Chap 2 (William Stallings)
William Stallings
Computer Organization
and Architecture
10th Edition
© 2016 Pearson Education, Inc., Hoboken,
NJ. All rights reserved.
+ Chapter 2
Performance Issues
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
+
Clock Speed
◼ A computer's operations (fetching, decoding, arithmetic, etc.)
are controlled by a clock.
◼ The clock speed (or clock rate) is how many times per second
the clock "ticks" — measured in Hertz (Hz).
◼ The time between ticks is the cycle time, and it’s the inverse
of the clock speed:
Basic Formula
Where:
• It’s like saying: “If my program has 50% easy instructions and
50% hard ones, how many clock cycles do I use on average?”
• It’s like checking your watch and counting how long your
program took, then figuring out how many clock cycles each
instruction used on average.
Where,
◼ p = processor cycles
◼ m = memory references
◼ This formula tells you the MIPS rate depends directly on the clock speed
(f) and inversely on the CPI.
Formulas Used
Where:
• Instruction breakdown:
Calculate MIPS:
Part B) Comments:
◼ Machine B has better CPI and higher MIPS, meaning it's more efficient on a per-
instruction basis.
◼ This happens because MIPS alone doesn’t tell the whole story. Just because a
machine can execute more instructions per second doesn’t mean it will finish a
program faster. The time it takes also depends on:
◼ The number of instructions the machine has to execute (instruction count).
◼ How many cycles each instruction takes to complete (Cycles Per Instruction, or CPI).
◼ In this case, although Machine B has a higher MIPS rate, its overall execution time
is still longer because it has a slightly higher instruction count or a different mix of
instructions.
◼ This shows that execution time (the actual time to finish the program) is a more
reliable measure of performance than just MIPS alone.
◼ Early examples of CISC and RISC design are the VAX 11/780 and
the IBM RS/6000, respectively. Using a typical benchmark program,
the following machine characteristics result:
◼ The final column shows that the VAX required 12 times longer than
the IBM measured in CPU time.
then
• P1: Clock rate = 2.5 GHz, CPI = 1.8, Instruction count = 1.2
million
• P2: Clock rate = 3.0 GHz, CPI = 2.0, Instruction count = 1.0
million
◼ If the original instruction count was 2 million and CPI was 2.5,
what is the percentage change in CPU execution time?
◼ Given two machines (M1 and M2) with the same instruction
set: