Q2/ Consider three different processors P1, P2, and P3 with the clock rates and CPIs given in the following table. Processor Clock Rate CPI P1 4 2 P2 2.5 1.0 P3 3 1.5 If the processors each execute a program in 10 seconds, find the number of cycles and the number of instructions. Which processor has the highest performance expressed in instructions per second if all processors have the same instructions set architecture? Q/3 Our favorite program runs in 10 seconds on computer A, which has a 400Mhz. clock. We are trying to help a computer designer build a new machine B, that will run this program in 6 seconds. The designer can use new technology to substantially increase the clock rate, but has informed us that this increase will affect the rest of the CPU design, causing machine B to require 1.2 times as many clock cycles as machine A for the same program. What clock rate should we tell the designer to target? Answer: Q 4/ Suppose we have two implementations of the same instruction set architecture (ISA). For some program: machine A has a clock cycle time of 10 ns. and a CPI of 2.0 machine B has a clock cycle time of 20 ns. and a CPI of 1.2 Which machine is faster for this program, and by how much? Q5 /A compiler designer is trying to decide between two code sequences for a particular machine. Based on the hardware implementation, there are three different classes of instructions: Class A, Class B, and Class C, and they require 1, 2 and 3 cycles (respectively). The first code sequence has 5 instructions: 2 of A, 1 of B, and 2 of C The second sequence has 6 instructions: 4 of A, 1 of B, and 1 of C. Which sequence will be faster? How much? What is the CPI for each sequence?
Q2/ Consider three different processors P1, P2, and P3 with the clock rates and CPIs given in the following table.
Processor | Clock Rate | CPI |
P1 | 4 | 2 |
P2 | 2.5 | 1.0 |
P3 | 3 | 1.5 |
- If the processors each execute a program in 10 seconds, find the number of cycles and the number of instructions.
- Which processor has the highest performance expressed in instructions per second if all processors have the same instructions set architecture?
Q/3 Our favorite program runs in 10 seconds on computer A, which has a 400Mhz. clock. We are trying to help a computer designer build a new machine B, that will run this program in 6 seconds. The designer can use new technology to substantially increase the clock rate, but has informed us that this increase will affect the rest of the CPU design, causing machine B to require 1.2 times as many clock cycles as machine A for the same program.
What clock rate should we tell the designer to target?
Answer:
Q 4/ Suppose we have two implementations of the same instruction set architecture (ISA). For some program:
machine A has a clock cycle time of 10 ns. and a CPI of 2.0
machine B has a clock cycle time of 20 ns. and a CPI of 1.2
Which machine is faster for this program, and by how much?
Q5 /A compiler designer is trying to decide between two code sequences for a particular machine. Based on the hardware implementation, there are three different classes of instructions: Class A, Class B, and Class C, and they require 1, 2 and 3 cycles (respectively).
The first code sequence has 5 instructions: 2 of A, 1 of B, and 2 of C
The second sequence has 6 instructions: 4 of A, 1 of B, and 1 of C.
Which sequence will be faster? How much? What is the CPI for each sequence?
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 8 images