Consider two different implementations, M1 and M2, of the same instruction set. There are three classes of instructions (A, B, and C) in the instruction set. M1 has a clock rate of 60MHz and M2 has a clock rate of 80MHz. The average number of cycles of each instruction class and their frequencies (for a typical program) are as follows:
Instruction Class M1-cycles M2-cycles/ Frequency
/instruction class instruction class
A 1 2 50%
B 2 3 20%
C 3 4 30%
a. Calculate the average CPI for each machine, M1 and M2.
b. Calculate the CPU execution time of M1 and M2.

Answers

Answer 1

Explanation:

A.)

we have two machines M1 and M2

cpi stands for clocks per instruction.

to get cpi for machine 1:

= we multiply frequencies with their corresponding M1 cycles and add everything up

50/100 x 1 = 0.5

20/100 x 2 = 0.4

30/100 x 3 = 0.9

CPI for M1 = 0.5 + 0.4 + 0.9 = 1.8

We find CPI for machine 2

we use the same formula we used for 1 above

50/100 x 2 = 1

20/100 x 3 = 0.6

30/100 x 4 = 1.2

CPI for m2 =  1 + 0.6 + 1.2 = 2.8

B.)

CPU execution time for m1 and m2

this is calculated by using the formula;

I * CPI/clock cycle time

execution time for A:

= I * 1.8/60X10⁶

= I x 30 nsec

execution time b:

I x 2.8/80x10⁶

= I x 35 nsec


Related Questions

User ideas for ro blox? I prefer no numbers or underscores.

Answers

do what the other person said

Which lighting technique can often heighten a dramatic story?

No lighting.
Front lighting.
Natural lighting.
Side or back lighting.

Answers

Answer:

side or back lighting

Explanation:

big brain

pharmaceutical company is using blockchain to manage their supply chain. Some of their drugs must be stored at a lower temperature throughout transport so they installed RFID chips to record the temperature of the container. Which other technology combined with blockchain would help the company in this situation?

Answers

Answer:

Artificial Intelligence (AI)

Explanation:

Artificial Intelligence (AI)

In this question, the answer is "Artificial intelligence", it is used as the simulation of human intelligence processes by machines, especially computer systems, which is called artificial intelligence.

Expert systems, natural language, voice recognition, and object detection are just a few of the specific uses of AI.Its convergence of blockchain technologies such as AI can accelerate machine learning and allow AI to produce and exchange financial goods.The blockchain enables secure storage and data sharing or anything else of value. In this, the data is analyzed, and insights and derived from it to generate value.

Learn more:

Artificial intelligence: brainly.com/question/17146621

For this exercise, you are going to complete the printScope() method in the Scope class. Then you will create a Scope object in the ScopeTester and call the printScope.
The method will print the name of each variable in the Scope class, as well as its corresponding value. There are 5 total variables in the Scope class, some of which can be accessed directly as instance variable, others of which need to be accessed via their getter methods.
For any variable that can be accessed directly, use the variable name. Otherwise, use the getter method.
Sample Output:
The output of the printScope method should look like this:
a = 5
b = 10
c = 15
d = 20
e = 25
public class ScopeTester
{
public static void main(String[] args)
{
// Start here!
}
}
public class Scope
{
private int a;
private int b;
private int c;
public Scope(){
a = 5;
b = 10;
c = 15;
}
public void printScope(){
//Start here
}
public int getA() {
return a;
}
public int getB() {
return b;
}
public int getC() {
return c;
}
public int getD(){
int d = a + c;
return d;
}
public int getE() {
int e = b + c;
return e;
}
}

Answers

Answer:

Explanation:

The following is the entire running Java code for the requested program with the requested changes. This code runs perfectly without errors and outputs the exact Sample Output that is in the question...

public class ScopeTester

{

public static void main(String[] args)

{

       Scope scope = new Scope();

       scope.printScope();

}

}

public class Scope

{

private int a;

private int b;

private int c;

public Scope(){

a = 5;

b = 10;

c = 15;

}

public void printScope(){

       System.out.println("a = " + a);

       System.out.println("b = " + b);

       System.out.println("c = " + c);

       System.out.println("d = " + getD());

       System.out.println("e = " + getE());

}

public int getA() {

return a;

}

public int getB() {

return b;

}

public int getC() {

return c;

}

public int getD(){

int d = a + c;

return d;

}

public int getE() {

int e = b + c;

return e;

}

}

Assume in the for loop header, the range function has the three arguments: range (1, 10, 3), if you were to print out the value of the variable
in the for loop header, what will be printed out? List the values and separate them with a comma.

Answers

Answer:

1, 4, 7

Explanation:

The instruction in the question can be represented as:

for i in range(1,10,3):

   print i

What the above code does is that:

It starts printing the value of i from 1

Increment by 3

Then stop printing at 9 (i.e.. 10 - 1)

So: The sequence is as follows

Print 1

Add 3, to give 4

Print 4

Add 3, to give 7

Print 7

Add 3, to give 10 (10 > 10 - 1).

So, it stops execution.

Why would an organization need to be aware of the responsibilities of hosting

personal data in its platforms?

Answers

Answer:

Providing transparent services for platform customers. Following data protection regulations to avoid disruptions from lack of compliance.

The computer scientists Richard Conway and David Gries once wrote: The absence of error messages during translation of a computer program is only a necessary and not a sufficient condition for reasonable [program] correctness. Rewrite this statement without using the words necessary or sufficient.

Answers

Answer:

A computer program is not reasonably correct if it has no error messages during translation.

 

Explanation:

First, we need to understand what the statement means, and we also need to identify the keywords.

The statement means that, when a program does not show up error during translation; this does not mean that the program is correct

Having said that:

We can replace some keywords as follows:

absence of error messages := no error messages

How should employees behave during interactions with clients and co-works

Answers

Answer:always be nice and welcoming

Explanation:

with the utmost respect, you are supposed to respect and listen to your superiors, they are paying you and giving you a job after all, they can easily take it.

Libby’s keyboard is not working properly, but she wants to select options and commands from the screen itself. Which peripheral device should she use?
A.
voice recognition
B.
microphone
C.
mouse
D.
compact disk

Answers

C. mouse is the answer

1. Add the following method to the Point class:
public double distance(Point other)
Returns the distance between the current Point object and the given other Point object. The distance between two points is equal to the square root of the sum of the squares of the differences of their x- and y-coordinates. In other words, the distance between two points (x1, y1) and (x2, y2) can be expressed as the square root of (x2 - x1)2 + (y2 - y1)2. Two points with the same (x, y) coordinates should return a distance of 0.0.
public class Point {
int x;
int y;
// your code goes here
}
2. Create a class called Name that represents a person's name. The class should have fields named firstName representing the person's first name, lastName representing their last name, and middleInitial representing their middle initial (a single character). Your class should contain only fields for now.
3. Add two new methods to the Name class:
public String getNormalOrder()
Returns the person's name in normal order, with the first name followed by the middle initial and last name. For example, if the first name is "John", the middle initial is 'Q', and the last name is "Public", this method returns "John Q. Public".
public String getReverseOrder()
Returns the person's name in reverse order, with the last name preceding the first name and middle initial. For example, if the first name is "John", the middle initial is 'Q', and the last name is "Public", this method returns "Public, John Q.".
4. Add the following method to the Point class:
public int quadrant()
Returns which quadrant of the x/y plane this Point object falls in. Quadrant 1 contains all points whose x and y values are both positive. Quadrant 2 contains all points with negative x but positive y. Quadrant 3 contains all points with negative x and y values. Quadrant 4 contains all points with positive x but negative y. If the point lies directly on the x and/or y axis, return 0.
public class Point {
private int x;
private int y;

// your code goes here
}

Answers

Answer:

Explanation:

The following code is written in Java and creates all of the methods that were requested in the question. There is no main method in any of these classes so they will have to be called from the main method and call one of the objects created method for the code to be tested. (I have tested it and it is working perfectly.)

class Point {

   private int x, y;

   public void Point(int x, int y) {

       this.x = x;

       this.y = y;

   }

   public double distance (Point other) {

      double distance = Math.sqrt(Math.pow((other.x - this.x), 2) + Math.pow((other.y - this.y), 2));

      return distance;

   }

   

   public int quadrant() {

       if (this.x > 0 && this.y > 0) {

           return 1;

       } else if (this.x < 0 && this.y > 0) {

           return 2;

       } else if (this.x < 0 && this.y < 0) {

           return 3;

       } else if (this.x > 0 && this.y < 0) {

           return 4;

       } else {

           return 0;

       }

   }

}

class Name {

   String firstName, lastName;

   char middleInitial;

   

   public String getNormalOrder() {

       String fullName = firstName + " " + middleInitial + " " + lastName;

       return fullName;

   }

   

   public String getReverseOrder() {

       String fullName = lastName + ", " + firstName + " " + middleInitial;

       return fullName;

   }

}

The child’s game, War, consists of two players each having a deck of cards. For each play, each person turns over the top card in his or her deck. The higher card wins that round of play and the winner takes both cards. The game continues until one person has all the cards and the other has none. Create a program that simulates a modified game of War.
The computer will play both hands, as PlayerOne and PlayerTwo, and, for each round will generate two random numbers and compare them.
If the first number is higher, PlayerOne’s score is increased by 1 and if the second number is higher, PlayerTwo’s score is increased by 1.
If there is a tie, no score is incremented.
When one "player" reaches a score of 10, that player should be deemed the winner and the game ends.
The range of numbers should be 1-13 to simulate the values of cards in the deck.

Answers

Answer:

In Python

import random

p1 = 0; p2 =0

while(p1 <10 and p2<10):

   p1play = random.randint(1,14)

   p2play = random.randint(1,14)

   print("Player 1 roll: "+str(p1play))

   print("Player 2 roll: "+str(p2play))

   if p1play > p2play:

       p1+=1

       print("Player 1 wins this round")

   elif p1play < p2play:

       p2+=1

       print("Player 2 wins this round")

   print()

print("Player 1: "+str(p1))

print("Player 2: "+str(p2))

if p1 > p2:    print("Player 1 wins")

else:    print("Player 2 wins")

Explanation:

See attachment for complete program where comments were used to explain some lines

Computers were originally invented to
Group of answer choices
A.to share information on the Internet.

B.make complex mathematical calculations possible and make tasks easier for humans.

C.to play video games.

Answers

Answer:

B

Explanation:

It's B because why would it me made to play video games

Answer:

B

Explanation:

A, the internet didnt exist yet, so it cant be this

C, video games would require computers, so its ruled out on a similar basis as the previous

how to learn python ?

Answers

Answer:

See below.

Explanation:

To learn python programming language, first, you have to know the basic. Surely, you may recognize this function namely print()

print(“Hello, World!”) — output as Hello, World!

First, start with familiarizing yourself with basic function such as print. Then step up with arithmetic and declare or assign variable then list.

Here are example of functions:

1.) print(argument) — If argument is a string (word-typed), make sure to use “” or ‘’ or else it’ll output an error and say the argument is not defined.

print(“Hi, Brainly”) will output Hi, Brainly

print(2+3) will output 5

Numerical data or numbers do not necessarily require “ “ or ‘ ‘

print(3+3) will output 6 but print(“3+3”) will output 3+3 which is now a string.

2.) type(argument) - this tells you which data/argument it is. There are

< class ‘str’ > which is string, meaning it contains “ “ or ‘ ‘< class ‘int’ > which is integer< class ‘float’ > which is decimal (20.0 is also considered as float, basically anything that contains decimal is all float type)< class ‘list’ > which is a list. List is something that contains elements within square brackets [ ]

etc.

Make sure you also do print(type(argument)) as well so it will print out the output.

3.) Arithmetic

+ is addition

Ex. print(1+3) will output 4

   2. - is subtraction

Ex. print(5-4) will output 1

   3. * is multiply

Ex. print(4*5) will output 20

   4. ** is exponent

Ex. print(5**2) will output 25

   5. / is division

Ex. print(6/3) will output 2 — sometimes will output the float type 2.0

   6. % is modulo or remainder

Ex. print(7%2) will output 1

4.) Variables

To assign a variable, use =

An example is:

x = 2

y = 5

print(x+y) will output 7

print(type(x)) will output the < class ‘int’ >

These are examples of what you’ll learn in basic of python - remember, programming depends on experience and always focus on it. Keep practicing and searching will improve your skill at python.

Other Questions
What is your favorite LEGO set Plz and thank you have a good rest of your day Leading up to the signing of a contract with an integration clause, a buyer sent an e-mail to the seller of a beautiful, new $45,000 boat asking, "You provide financing, right?" The seller responded, "Yes, of course." The contract, which the parties signed yesterday, said nothing about financing. Right after signing, the seller said, "OK, let's get you set up with financing!" He then ran the buyer's credit, which was not good. The buyer was not approved for financing through the seller's only source. The buyer believes that he, therefore, is not liable for the cost of the boat. Is the buyer correct? Jim did 35 push-ups on Saturday, 42 push-ups on Sunday, 49 push-ups on Monday, and 56 push-ups on Tuesday. What kind of sequence is this? Which phrase best completes the diagram?Goals of the CrusadesCapture theHoly LandFind new tradingpartnersA. Form alliances with Muslim leadersB. Reduce the power of European kingsc. Give European peasants equal treatmentD. Protect the Byzantine Empire WHAT'S 675 DIVIDED BY 8 HELPPPP PLEASE TELL ME THE NUMBERS TO SHOW MY WORK A(5,1)B(x,7) C(8,2) are three points such that AB=2AC find all values of x I have a test tmrw pls help In which of the following types of infection will the infected host cell burst?A lysogenic infectionB prophage infectionC provirus infectionD lytic infection question, the highlighted part, and passage are in the picture, AND ANSWER TODAYand no links... they could have firewall breakers and/or viruses (two similar things but they do different stuff)(the highlighted part looks bolded in the photo but if you somehow cant tell which one it is, its the part where it says "Soaring fire that sways and sings")A) hyperboleB) personificationC) simileD) metaphor Entity001 And Project PLEASE ANSWERBryce went to the zoo at 10:15 am, and got home at 4:40 pm. How long was he gone?7 hours and 35 minutes5 hours and 35 minutes6 hours and 25 minutes6 hours and 55 minutes You are given an array of arrays a. Your task is to group the arrays a[i] by their mean values, so that arrays with equal mean values are in the same group, and arrays with different mean values are in different groups. Each group should contain a set of indices (i, j, etc), such that the corresponding arrays (a[i], a[j], etc) all have the same mean. Return the set of groups as an array of arrays, where the indices within each group are sorted in ascending order, and the groups are sorted in ascending order of their minimum element.ExampleFora = [[3, 3, 4, 2], [4, 4], [4, 0, 3, 3], [2, 3], [3, 3, 3]]the output should bemeanGroups(a) = [[0, 4], [1], [2, 3]]mean(a[0]) = (3 + 3 + 4 + 2) / 4 = 3;mean(a[1]) = (4 + 4) / 2 = 4;mean(a[2]) = (4 + 0 + 3 + 3) / 4 = 2.5;mean(a[3]) = (2 + 3) / 2 = 2.5;mean(a[4]) = (3 + 3 + 3) / 3 = 3.There are three groups of means: those with mean 2.5, 3, and 4. And they form the following groups:Arrays with indices 0and 4 form a group with mean 3;Array with index 1 forms a group with mean 4;Arrays with indices 2and 3 form a group with mean 2.5.Note that neithermeanGroups(a) = [[0, 4], [2, 3], [1]]normeanGroups(a) = [[0, 4], [1], [3, 2]]will be considered as a correct answer:In the first case, the minimal element in the array at index 2 is 1, and it is less then the minimal element in the array at index 1, which is 2.In the second case, the array at index 2 is not sorted in ascending order.Fora = [[-5, 2, 3], [0, 0], [0], [-100, 100]]the output should bemeanGroups(a) = [[0, 1, 2, 3]]The mean values of all of the arrays are 0, so all of them are in the same group.Input/Output What person is memory laps by david sedaris written in ? Please answer at least one of the pictures attached below I need a story using the words Invidious, Providential, Affable, Indict, Confound, Sustain, Implement, and Formative can any one help. An aquarium has 14 angel fish, 12 clownfish and18 seahorses. What is the ratio of angelfish toseahorses? evaluate this expression for a=3 The minute hand of a clock moves from 12:10 to 12:30 a. How many degrees does the minute hand move during this time? b.How many radians does it move during this time? the ideal of stationary orbit was first given by? 5Select the correct answer from the drop-down menu.Read the excerpt. Then choose the correct way to complete the sentence.To Thoreau, the underlined sentence in this paragraph representsan unjust government.ResetNext