42.3k views
4 votes
Suppose a program is running on a distributed-memory multiprocessor. There are 1,000 instructions in the program and 80% of instruction references hit in the local memory and 20% of instruction references involve the remote communication in the remote memory. 10 ns time is required for the remote communication for each instruction reference. If the CPU clock rate is 4 GHZ and CPI is 0.5, what is the running time of this program?

User Smkanadl
by
5.0k points

1 Answer

0 votes

Answer:

2125 ns.

Step-by-step explanation:

First of all Execution Time = Number of Instructions * CPI * Clock Cycle

Number of Instructions = 1000

CPI = 0.5

Clock Cycle = 1/clock rate = 1/4GHz = 0.25 * 10-9 s

So Execution Time = 1000 * 0.5 * 0.25 * 10-9

Execution Time = 125 * 10-9 s

Execution Time = 125 ns

Now 20% of the instructions take 10 ns extra time for remote communication.

1 instruction takes 10ns

so 20% of 1000 = 200 instructions will take 200*10 = 2000ns

So Total Execution Time = 125+2000 = 2125 ns.

User Pavan
by
5.1k points