Give a program with 106 instructions divided into classes as follows: 10% class A, 20% class B, 50% class C, and 20% class D   Clock Rate CPI Class A CPI Class B CPI Class C CPI Class D Computer 1 2.5 GHz 1 2 3 3 Computer 2 3.0 GHz 2 2 2 2 What are the clock cycles to execute this program on each computer? What is the average CPI for each computer? Which computer is faster? By how much?

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter1: Fundamentals Of C++ Programming
Section1.3: Preliminary Three: Software Development
Problem 3E: (Electrical eng.) You’ve been asked to write a program that outputs the following specifications:...
icon
Related questions
Topic Video
Question

 

  1. Give a program with 106 instructions divided into classes as follows: 10% class A, 20% class B, 50% class C, and 20% class D
 

Clock Rate

CPI Class A

CPI Class B

CPI Class C

CPI Class D

Computer 1

2.5 GHz

1

2

3

3

Computer 2

3.0 GHz

2

2

2

2

What are the clock cycles to execute this program on each computer?

What is the average CPI for each computer?


Which computer is faster? By how much?

Expert Solution
Step 1

Solution:

(a) No. of clock cycles needed Clock Cycles = Number of Instruction *CPI

C1: = 1X 105 * 1+2×105 *2+3x105*3+2×105*3        = 105 ( 1+4+15+6)        =26 X 105 clock cyclesC2: = (1X105 + 2*105+5*105 + 2*105) *2        =20 X 105  clock cycles

 

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr