COMPUTER ORGANIZATION AND DESIGN
SPRING 1999
HOMEWORK ASSIGNMENT 2 (EXAMPLE ONLY)
We want to compare the performance of two different systems,
S1 and S2. System S1 costs $1,500 and System S2 costs $3,000.
The following measurements have been made on these systems:
|
Program
|
Time on S1
|
Time on S2
|
|
P1
|
8 seconds
|
12 seconds
|
|
P2
|
8 seconds
|
6 seconds
|
Table 1
We say that one machine is more cost effective than another if
the quantity (cost divided by performance) is lower.
One user cares only about the performance of program P1.
- Which machine is more cost effective for running only program P1? Answer: S1
- By how large a factor? Answer: 3
Another user cares only about the performance of program P2.
- Which machine is more cost effective for running only program P2? Answer: S1
- By how large a factor? Answer: 1.5
You are given additional information about the systems in Table 1:
The clock frequency of system S1 is 300 MHz,
the clock frequency of system S2 is 500 MHz, and the instruction counts
are as shown in the following table
(note that there are 8 zeros at the end of each number; hence the instruction count is
equal to an integer times 108):
|
Program
|
IC on S1
|
IC on S2
|
|
P1
|
5000000000
|
7000000000
|
|
P2
|
4000000000
|
7000000000
|
Table 2
- What is the average number of clock periods per instruction (CPI) for program P1 on machine S1? Answer: 4.8
- What is the average number of clock periods per instruction (CPI) for program P1 on machine S2? Answer: 8.57
- What is the average number of clock periods per instruction (CPI) for program P2 on machine S1? Answer: 6
- What is the average number of clock periods per instruction (CPI) for program P2 on machine S2? Answer: 4.29
- If the number of clock periods per instruction (CPI) for Program P1 is 5 on system S1, what is the instruction count for P1 on S1? Answer: 4.8 X 108
- If the number of clock periods per instruction (CPI) for Program P1 is 10 on system S2, what is the instruction count for P1 on S2? Answer: 6 X 108
- If the number of clock periods per instruction (CPI) for Program P2 is 5 on system S1, what is the instruction count for P2 on S1? Answer: 4.8 X 108
- If the number of clock periods per instruction (CPI) for Program P2 is 1 on system S2, what is the instruction count for P2 on S2? Answer: 3 X 109