Quiz7
Due No due date Points 10
Questions 4 Available until Feb 24 at 4:20pm Time Limit 60 Minutes
Instructions
You can take this quiz only once.
Once you start the quiz, you will need to complete it.
This quiz was locked Feb 24 at 4:20pm.
Attempt History
Attempt Time Score
LATEST Attempt 1 12 minutes 2 out of 10
Score for this quiz: 2 out of 10 Submitted Feb 24 at 4:02pm This attempt took 12 minutes.
Question 1
2 / 2 pts
Suppose you wish to run a program P with 8.75 x 10 9 instructions on a 5 GHz machine with a CPI of 0.8. What is the expected CPU time (seconds) to execute this program on this machine?
Your Answer: (8.75*10^9)*0.8/5*10^9=1.4
Time = (seconds/cycle) * (cycles/instruction) * (number of instructions)
= (1 second / (5 x 10 9 cycle)) * ( 0.8 cycles/instruction) * (8.75 x 10 9 instructions)
= (0.8 * 8.75 x 10 9 ) / (5 x 10 9) = 1.4 seconds
Question 2
0 / 3 pts
nanswered
Consider two different implementations, I1 and I2, of the same instruction set. There are three classes of instructions (A, B, and C) in the instruction set. I1 has a clock rate of 6 GHz, and I2 has a clock rate of 3 GHz. The average number of cycles for each instruction class on I1 and I2 is given in the following table:
Class
CPI on I1
CPI on I2
C1 Usage
A
2
1
40%
B
3
2
40%
C
5
2
20%
The table also contains a summary of average proportion of instruction classes generated by a compiler C1.
2-a). Using C1, compute the average (expected) CPI for both I1 and I2.
– computed by ∑ (CPI_i x Usage_i) Your Answer:
CPI_I1 = (2 x 0.4) + (3 x 0.4) + (5 x 0.2) = 0.8+1.2+1 = 3 cycles/instruction
CPI_I2 = (1 x 0.4) + (2 x 0.4) + (2 x 0.2) = 0.4+0.8+0.4 = 1.6 cycles/instruction
Question 3
0 / 3 pts
nanswered
2-b). Compute their speed, that is the average number of instructions per second for both I1 and I2.
Your Answer:
nanswered
Question 4
0 / 2 pts
2-c). Decide which one is faster than the other and in what ratio. (you can round the ratio in 6 digits)
Your Answer:
Instructions per second_I1/Instructions per second_I2
= (2 x 10 9 ) / (1.875 x 10 9 ) = 16/15 » 1.06667
Thus I1 is 16/15 times as fast as I2. (I1 is faster than I2.)
Quiz Score: 2 out of 10
Instructions per second = (cycles/second) / (cycles/instruction)
Instructions per second_I1 = (6 x 10 9)/ 3 = 2 x 10 9
Instructions per second_I2 = (3 x 10 9)/1.6 = 1.875 x 10 9