425,600 views
18 votes
18 votes
A program consists of 100,000 instructions as follows:

Instruction Type Instruction Count Cycles per Instruction
Integer arithmetic 45,000 4
Data transfer 32,000 6
Floating point arithmetic 15,000 10
Control transfer 8,000 3

Determine:

a. the program execution time
b. the effective CPI for the machine
c. MIPS rate for the following processors

User Daniel Armstrong
by
2.8k points

1 Answer

17 votes
17 votes

Answer:

Execution time is 13.65ms

CPI is 5.46

MIPS is 73.3\ MIPs

Step-by-step explanation:

Given:


s = 40MHz --- processor speed [Missing from the question]


\begin{array}{ccc}{Instruction\ Type} & {Instruction\ Count} & {Cycles\ per\ Instruction} & {Integer\ Arithmetic} & {45000} & {4} \ \\ {Data\ Transfer} & {32000} & {6} & {Floating\ point\ arithmetic} & {15000} & {10} & {Control\ Transfer} &{8000} & {3} \ \end{array}

Solving (a): The program execution time

First, we solve for (b)

Solving (b): The effective CPI

This is calculated as:


CPI = (\sum IC * CI)/(\sum IC)

Where: IC = Instruction Count and CI = Cycles per Instruction

So, the equation becomes:


CPI = (45000 *4 + 32000 * 6 + 15000 * 10 + 8000 * 3)/(45000+32000+15000+8000)


CPI = (546000)/(100000)


CPI = 5.46

Solving (c): MIPS

This is calculated as:


MIPS = Speed * (1)/(CPI) * (1)/(\sum IC)


MIPS = 40 * (1)/(5.46) * (1)/(100000)


MIPS = (40 * 1 * 1)/(5.46*100000)


MIPS = (40)/(546000)


MIPS = 0.00007326007

Convert to MIPs


MIPS = 73.3\ MIPs

Solving (a): Execution Time

This is calculated as:


Time = Instructions * CPI * (1)/(Speed)


Time = 100000 * 5.46* (1)/(40M)


Time = (546000)/(40M)


Time = (546000)/(40*1000000)


Time = (546000)/(40000000)


Time = 0.01365s


Time = 13.65ms

Execution time is 13.65ms

User Webbower
by
2.7k points