Computer Architecture and Organization Ch#2 Examples
Computer Architecture and Organization Ch#2 Examples
Example (chapter 2)
1. Consider two different machines, with two different instruction sets, both of which have a clock rate of
200 MHz. The following measurements are recorded on the two machines running a given set of benchmark
programs:
b. Even though, machine B has a higher MIPS than machine A, it needs a longer CPU time to
execute the similar set of benchmark programs (instructions).
1
3. 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:
Processor Clock Frequency Performance CPU Time
VAX 11/780 5 MHz 1 MIPS 12 x seconds
IBM RS/6000 25 MHz 18 MIPS x seconds
The final column shows that the VAX required 12 times longer than the IBM measured in CPU time.
a. What is the relative size of the instruction count of the machine code for this benchmark program
running on the two machines?
b. What are the CPI values for the two machines?
Answer:
a. The MIPs rate could be computed as the following:
Now by computing the ratio of the instruction count of the IBM RS/6000 to the VAX 11/780 which is:
[ x × 18] / [12x × 1] = 18x / 12x = 1.5
4. Four benchmark programs are executed on three computers with the following results:
The table shows the execution time in seconds, with 100,000,000 instructions executed in each of the four
programs. Calculate the MIPS values for each computer for each program.
2
Rank
Arithmetic
mean
Computer A 25.575 1
Computer B 2.80 3
Computer C 3.25 2
Rank
Harmonic
mean
Computer A 0.25 2
Computer B 0.21 3
Computer C 2.1 1
5. Consider the fact that the outcomes of Machine X,Y with two different instruction set, both of which
have average CPI, Ic and MIPS rate, which yielded the result of CPI = 2.24, Ic = 2 million and MIPS rate =
178. Now assume that the program can be executed in eight parallel tasks or threads with roughly equal
number of instructions executed in each task. Execution is on an 8-core system with each core (processor)
having the same performance as the single processor originally used. Coordination and synchronization
between the parts adds an extra 25,000 instruction executions to each task. Assume the same instruction
mix as in the example for each task, but increase the CPI for memory reference with cache miss to 12 cycles
due to contention for memory.
a. Determine the average CPI.
b. Determine the corresponding MIPS rate.
c. Calculate the speedup factor.
d.Compare the actual speedup factor with the theoretical speedup factor determined by Amdhal’s law.
Answer:
a. Since we have the same instruction mix, that means the additional instructions for each task could be
allocated appropriately between the instruction types. Therefore, the following table be gotten:
The average CPI = (1× 0.6) + (2 × 0.18) + (4 × 0.12) + (12 × 0.1) = 2.64. Therefore, the CPI has
been increased since the time for memory access is also increased.
3
c. The speedup factor equals to the ratio of the execution times. The execution time is calculated
as the following: T = Ic / (MIPS × 106).
For the one processor, T1 = (2 × 106) / (178 × 106) = 11 ms.
For the 8 processors, each processor executes 1/8 of the 2 million instructions plus the 25,000