1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nlexa [21]
4 years ago
8

Compilers can have a profound impact on the performance of an application. Assume that for a program, compiler A results in a dy

namic instruction count of 1.0E9 and has an execution time of 1.1 s, while compiler B results in a dynamic instruction count of 1.2E9 and an execution time of 1.5 s. a. Find the average CPI for each program given that the processor has a clock cycle time of 1 ns. b. Assume the compiled programs run on two different processors. If the execution times on the two processors are the same, how much faster is the clock of the processor running compiler A’s code versus the clock of the processor running compiler B’s code? c. A new compiler is developed that uses only 6.0E8 instructions and has an average CPI of What is the speedup of using this new compiler versus using compiler A or B on the original processor?
Physics
1 answer:
marta [7]4 years ago
5 0

Answer

1.

CPI for Compiler A = 1.1

CPI for Compiler B = 1.25

2. The clock rate of A is 27% slower than clock rate of B

3. C is 1.67 times faster than A and 2.27 times faster than B

Explanation:

1.

Given

Cycle Time = 1ns = 10^-9

CPU Time for A = 1.1s

Instruction count = 10^9

CPU Time for B = 1.5s

Instruction Count = 1.2*10^9

CPU Time = Instructions * Cycle Time * CPI

So, CPI = CPU Time / (Instructions * Cycle Time)

CPI for A = 1.1/(10^9 * 10^-9)

CPI = 1.1

CPI for B = 1.5/(1.2 * 10^9 * 10^-9)

CPI = 1.5/12

CPI = 1.25

2.

Given

Execution Time on A = Execution Time on B

CPU Time for A = 1.1s

Instruction count = 10^9

CPI = 1.1

CPU Time for B = 1.5s

Instruction Count = 1.2*10^9

CPI = 1.25

Execution Time = Instructions * CPI/ Clock Rate

Execution Time A = Execution Time B

Instruction A * CPI A / Clock Rate A = Instruction B * CPI B/ Clock Rate B. ----- Make Clock Rate A the subject of formula

Clock Rate A = (Instruction A * CPI A * Clock Rate B) / (Instruction B * CPI B)

Clock Rate A = (10^9 * 1.1 * Clock Rate B) / (1.2 * 10^9 * 1.25)

Clock Rate A = 0.73 Clock Rate B

So the clock rate of A is 27% slower than clock rate of B

3.

For compiler A and C,

CPU Time = Instructions * Cycle Time * CPI

CPU Time of C = 6 * 10^8 * 1.1 * 10^-9 = 0.66s

Using ratio of CPU time and Compiler performance

i,e.

CPU Time of A * Performance of A = CPU Time of C * Performance of C

Given

CPU Time of A = 1.1

CPU Time of C = 0.66

1.1 * Performance of A = 0.66 * Performance of C

Performance of C: Performance of A = 1.1/0.66

Performance of C : Performance of A = 1.67

So, C is 1.67 times faster than A

Also,

CPU Time of B = 1.5

CPU Time of C = 0.66

1.5 * Performance of B = 0.66 * Performance of C

Performance of C: Performance of B = 1.5/0.66

Performance of C : Performance of B = 2.27

So, C is 2.27 times faster than B

You might be interested in
A cubical box measuring 1.29 m on each side contains a monatomic ideal gas at a pressure of 2.0 atm How much thermal energy do t
Marrrta [24]

Answer:

a) U = 652.545\,kJ, b) v \approx 659.568\,\frac{m}{s}

Explanation:

a) According to the First Law of Thermodinamics, the system is not reporting any work, mass or heat interactions. Besides, let consider that such box is rigid and, therefore, heat contained inside is the consequence of internal energy.

Q = U

The internal energy for a monoatomic ideal gas is:

U = \frac{3}{2} \cdot n \cdot R_{u} \cdot T

Let assume that cubical box contains just one kilomole of monoatomic gas. Then, the temperature is determined from the Equation of State for Ideal Gases:

T = \frac{P\cdot V}{n\cdot R_{u}}

T = \frac{(202.65\,kPa)\cdot(1.29\,m)^{3}}{(1\,kmole)\cdot(8.314\,\frac{kPa\cdot m^{3}}{kmole\cdot K} )}

T = 52.325\,K

The thermal energy contained by the gas is:

U = \frac{3}{2}\cdot (1\,kmole)\cdot (8.314\,\frac{kPa\cdot m^{3}}{kmole\cdot K})\cdot (52.325\,K)

U = 652.545\,kJ

b) The physical model for the cat is constructed from Work-Energy Theorem:

U = \frac{1}{2}\cdot m_{cat} \cdot v^{2}

The speed of the cat is obtained by isolating the respective variable and the replacement of every known variable by numerical values:

v = \sqrt{\frac{2 \cdot U}{m_{cat}}}

v = \sqrt{\frac{2\cdot (652.545 \times 10^{3}\,J)}{3\,kg} }

v \approx 659.568\,\frac{m}{s}

3 0
3 years ago
How many neutrons is there in that element that has 36 protons and 36 electrons
bagirrra123 [75]
You need to know the mass number to work it out. I can see you have it but it's not visible on your photo.

Every proton weighs 1 and every neutron weighs 1 so if you know the total mass of the nucleus and the number of protons, then you can do:
Mass Number - Proton Number = Neutron Number
because the rest of the mass (that isn't from the protons) must come from the neutrons. Make sense?
3 0
3 years ago
The Celsius temperature scale is based on which of the following
saw5 [17]
The boiling and freezing point of water. You know this because at 0degrees water freezes and at 100 degrees water boils
6 0
3 years ago
Read 2 more answers
A service elevator takes a load of garbage, mass 10.0 kg, from a floor of a skyscraper under construction, down to ground level,
kobusy [5.1K]

Answer:

The magnitude of the force the garbage exerts on the floor of the service elevator is 12 N

Explanation:

Given;

mass of the garbage, m = 10.0 kg

acceleration of the elevator, a = 1.2 m/s²

The magnitude of the force the garbage exerts on the floor of the service elevator is given by;

F = ma

F = 10 x 1.2

F = 12 N

Therefore, the magnitude of the force the garbage exerts on the floor of the service elevator is 12 N

8 0
4 years ago
A student wishes to record a 7.5-kilogram watermelon colliding with the ground. Calculate how far the watermelon must fall freel
algol [13]

Answer:

42.86m

Explanation:

The first thing we should keep in mind is that the watermelon moves with uniform acceleracion equal to gravity (9.81m / s ^ 2)

A body that moves with constant acceleration means that it moves in "a uniformly accelerated motion", which means that if the velocity is plotted with respect to time we will find a line and its slope will be the value of the acceleration, it determines how much it changes the speed with respect to time.

When performing a mathematical demonstration, it is found that the equations that define this movement are as follows.

\frac {Vf^{2}-Vo^2}{2.g} =Y

where

Vf=29m/s= final speed

Vo= initial speed=0m/S

g=gravity=9.81m/s^2

Y= distance traveled(m)

solving

\frac {Vf^{2}-Vo^2}{2.g} =Y\\\frac {(29m/s)^{2}-(0m/s)^2}{2(9.8m/s^2)} =Y\\Y=42.86m\\

the distance traveled by watermelon is 42.86m

       

5 0
4 years ago
Other questions:
  • You make the following measurements of an object: 42kg and 22m³. What would the objects density be? Show all work please and the
    14·1 answer
  • If a refrigerator draws 2.2 A at 120 V, What is its resistance?
    9·1 answer
  • A student drops a water balloon from tall building trying to hit her roommate on the ground below (and misses). After dropping t
    13·1 answer
  • Which of the following is an example of acceleration?
    15·1 answer
  • In an experiment, you use 0.457 L from one container and 0.432 L from another container of acetic acid in a reaction. How many M
    9·1 answer
  • How does mass affect the speed of falling objects?
    13·1 answer
  • 50 points. Can objects get energy from other objects that have energy? use the simulation to answer.
    15·1 answer
  • A student attaches block A to a force sensor and pulls it across a frictionless table. The force on block A is
    5·2 answers
  • How is radiation used to treat cancer?
    6·2 answers
  • Learning task 2: Using the information you gathered from Learning Task 1, make a concept web of the contributions of the followi
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!