141k views
4 votes
ssume that program a has the following characteristics when executed on processors p1, p2, and p3 processor clock rate number of instructions execution time p1 4.0 ghz 10 x 109 10 seconds p2 2.0 ghz 5 x 109 10 seconds p3 5.0 ghz 20 x 109 8 seconds 1.1. find the ipc (number of instructions per cycle) for each processor that executes program a described in the table above. (9 points) 1.2. find the new clock rate of p3 that will yield the same cpi as processor p1. assume that there are no other changes, i.e. the execution time stays the same as in the table. (6 points) 1.3. find the number of instructions for p2 that will yield the same execution time for the above program as processor p3. assume that there are no other changes.

User Fayette
by
7.1k points

1 Answer

5 votes
1.1. IPC (instructions per cycle) is calculated by dividing the number of instructions executed by the number of cycles during the execution time. To find the IPC for each processor:

For processor P1: IPC = 10 x 10^9 / (4.0 x 10^9 x 10) = 0.25
For processor P2: IPC = 5 x 10^9 / (2.0 x 10^9 x 10) = 0.25
For processor P3: IPC = 20 x 10^9 / (5.0 x 10^9 x 8) = 0.32
1.2. To find the clock rate of P3 that will yield the same CPI (cycles per instruction) as processor P1:

We need to equate the IPC of P1 and P3, which is 0.25: 0.25 = 20 x 10^9 / (clock rate of P3 x 8)
Solving for the clock rate: clock rate of P3 = 20 x 10^9 / (0.25 x 8) = 100 GHz
1.3. To find the number of instructions that P2 must execute to have the same execution time as P3:

We need to equate the IPC of P2 and P3, which is 0.32: IPC of P2 = 0.32
The number of instructions can be found by rearranging the IPC equation: I = clock rate x execution time x IPC
For P2: I = 2.0 x 10^9 x 10 x 0.32 = 64 x 10^9 instructions
User Brian Ortiz
by
7.3k points