Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A program consists of 4 types of instructions as shown below. What is the averag

ID: 3885675 • Letter: A

Question

A program consists of 4 types of instructions as shown below. What is the average CPI? How long does a program take to run on a processor with a 2GHz clock if it has 10^10 instructions and a CPI of 2? A program takes 15 seconds to execute. There are 10^10 instructions with a CPI of 1.5. What is the clock cycle time? Assuming negligible delays except: memory (300ps), ALU and adders (150), register file access (100ps). Instruction and data memory are separate and register access is counted twice. What is the clock cycle time for a single cycle?

Explanation / Answer

We can use basic performance equation of programs and it is given as

T=(N*S)/R

Where

T=time to execute program

S=total number of clock cycles required to execute an instruction

N=number of instructions executed

R=clock rate in cycle per second

1 ans:

From the given hypothesis,we can write as

0.5

sum of products=0.5+0.5+1.2+1.8=3

Therefore,Average Cycle per Instruction(CPI)=S=3

2 ans:

Given

CPI=S=2

N=1010

R=2GHZ

Therefore,1/R=1/2=0.5 nanosec

T=(N*S)/R

=1010*2*0.5

=1010 nanosec

=1.01 microsec

Therefore,program takes 1.01 microsec to run on the given processor.

3 ans:

Given

T=15 sec

N=1010

CPI=1.5

Therefore,clock cycle time is P and

P=1/R=T/(NS) =15/(1010*1.5)

P=9.9 millisec

Cycles fraction value of percentage product 1

0.5

0.5 2 0.25 0.5 3 0.4 1.2 4 0.2 1.8
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote