The 144 processors can be used in one of three modes at any given time: (1) all processors in use, (2) 72 processors in use, (3) serial mode (that's one at a time for you CS majors).
Please answer the following questions regarding this potential system. Be sure to include any assumptions necessary to justify your answer.
Answer: This is straightforward Amdahl's law. One can use the purest version, noticing that the fraction of time spent using the FPS is 0.8, giving FE is 0.8; the speedup using the FP hardware is 15, given SE is 15.
Thus, the expected speedup is
An alternative is to pretend that the original execution time, , is 1.0, and then compute the new execution time and take the quotient to calculate the speedup. Because of the original execution time is spent using the FPS, when we use the FPC, that portion of the original execution time is 15 times faster.
Thus, the new execution time is:
Thus, speedup is the quotient of the execution times, which is:
Give an expression for , the fraction of the original instructions that must be discarded by the new compiler to improve the execution time.
Answer: The first thing to do is convert the word problem to mathematical sentences.
...increasing the CPI by 60% means
...increasing the CR by a factor of 15 means
..., the fraction of the original
instructions that must be discarded by the new compiler
means
...to improve the execution time means that
Combining these expressions with the CPU performance equation yields:
Cancelling like terms gives us:
Now, here is the thought process. We want to determine the values of make the inequality above true. But, 15 divided by 1.6 is already greater than one. So, we don't have to discard any instructions, giving .
Answer: This is basically another application of Amdahl's law. If we used all the processors for a portion of the execution time (FE), then the speedup due to the enhancment (SE) would be 144.
If we plug these into Amdahl's law, we have
Combining these pieces gives us the expected speedup of
To achieve an effective speedup of 144, we would need to have FE = 1. So, the question becomes, `` Is it reasonable to expect FE=1?'' For lots of reasons, it's impossible to make use of all processors simultaneously--some portion of a process, such as initialization of data, or synchronization of processor operations, cannot be enhanced by using additional processors because it is inherently serial.
Answer: This is the Amdahl's law with multiple enhancements, each applied separately, that was promised in the newsgroup. You can either memorize the formula, which is presented in the book in Exercise 1.15 (??) and its answers. Or, you can do what we did in problem 2.1, and compute the quotient of the old and new execution times, assuming that the old execution time is 1.
Now, apparently the hard part is realizing that the speedup associated with using half the processors is 72, and the speedup associated with using all the processors is 144.
From the problem, the fraction of time that half the processors can be used is 0.5, giving and
Similarly, the fraction of time that all the processors can be used is 0.3, giving and
The fraction that can't be enhanced is
So,
Combining all this gives a speedup of