A AS TU ,SO FT WA RE EN GI NEE RI NG DE PA RT MEN T
T AM ER U H . Amdhal’s law Gene Amdahl [AMDA67] Potential speed up of program using multiple processors For program running on single processor
Fraction f of code infinitely parallelizable with no
scheduling overhead Fraction (1-f) of code inherently serial T is total execution time for program on single processor N is number of processors that fully exploit parallel portions of code Cont’d.. Cont’d…
Conclusions
f small, parallel processors has little effect
N ->∞, speedup bound by 1/(1 – f) Diminishing returns for using more processors Exercise 1
Consider 4 potential applications of the Amdhal’s Law
Formula: 1. 95% of a task/program/etc. is improved by 10% 2. 5% of a task/program/etc. is improved by 10X 3. 5% of a task/program/etc. is infinitely improved 4. 95% of a task/program/etc. is infinitely improved
For all 4 cases, what is the overall speedup of the
task? Exercise 2 Consider two different implementations, M1 and M2, of the same instruction set. There are three classes of instructions (A, B, and C) in the instruction set. M1 has a clock rate of 80 MHz and M2 has a clock rate of 100 MHz. The average number of cycles for each instruction class and their frequencies (for a typical program) are as follows:
(a) Calculate the average CPI for each machine, M1, and M2. Cont’d..
(b) Calculate the average MIPS ratings for each
machine, M1 and M2.
(c) Which machine has a smaller MIPS rating ?
Which individual instruction class CPI do you need to change, and by how much, to have this machine have the same or better performance as the machine with the higher MIPS rating (you can only change the CPI for one of the instruction classes on the slower machine)? Exercise 3
Computer A has an overall CPI of 1.3 and can be run
at a clock rate of 600MHz. Computer B has a CPI of 2.5 and can be run at a clock rate of 750 Mhz. We have a particular program we wish to run. When compiled for computer A, this program has exactly 100,000 instructions. How many instructions would the program need to have when compiled for Computer B, in order for the two computers to have exactly the same execution time for this program? Exercise 4
The design team for a simple, single-issue processor is
choosing between a pipelined or non-pipelined implementation. Here are some design parameters for the two possibilities: Cont’d…
(a) For a program with 20% ALU instructions, 10%
control instructions and 75% memory instructions, which design will be faster? Give a quantitative CPI average for each case.
(b) For a program with 80% ALU instructions, 10%
control instructions and 10% memory instructions, which design will be faster? Give a quantitative CPI average for each case.
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More