Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a. [3 points] Derive a simple formula for the execution time of a program on a computer based on the properties of the program, compiler

a. [3 points] Derive a simple formula for the execution time of a program on a computer based on the properties of the program, compiler and the CPU.

Consider two machines M1 and M2 with different ISAs and with the clock rates 2.2 GHz and 2.4 GHz respectively. There are six classes of instructions (see the table below) in both ISAs. A program is compiled into both machines and gave two sets of machine language instruction sets (say ML1 and ML2). In both machine language programs, ML1 and ML2, the average number of cycles for the instructions of each instruction class and their frequencies are given below:

Instruction Class

Machine M1 ML1

Machine M2 ML2

Cycles/Instr Class

Frequency (%)

Cycles/Instr Class

Frequency (%)

LW

5

10

4

20

SW

4

20

4

10

Branch

3

10

3

20

Other I-type

1

20

2

10

R-type

1

30

1

30

J- type

1

10

1

10

b. [3 points] Calculate the average CPI for each machine, M1, and M2.

c. [3 points] Calculate the average MIPS ratings for both machines. Which machine is faster (based on MIPS)?

Note that, 1 GHz = 10 9 Hz, and 1 million is 10 6

d. [3 points] If the above program takes 250 ns ( 1 ns = 10 -9 sec)to execute on the machine M1, how many instructions are there in the program?

e. [3 points] Assume ML2 has 30 less machine instructions than ML1. Which machine is faster for this program [calculate how much time will it take to execute the same program on machine M2]?

BONUS-2 [3 points]: Which machine, M1 or M2, will spent more time on executing memory reference instructions? By how much (in nano seconds)?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Are robots going to displace all workers? Explain your answer.

Answered: 1 week ago