answer.
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
harina [27]
1 year ago
15

A common fallacy is to use MIPS (millions of instructions per second) to compare the performance of two different processors, an

d consider that the processor with the largest MIPS has the largest performance. Check if this is true for P1 and P2.
Computers and Technology
1 answer:
yulyashka [42]1 year ago
3 0

The question is incomplete. It can be found in search engines. However, kindly find the complete question below:

Question

Cites as a pitfall the utilization of a subset of the performance equation as a performance metric. To illustrate this, consider the following two processors. P1 has a clock rate of 4 GHz, average CPI of 0.9, and requires the execution of 5.0E9 instructions. P2 has a clock rate of 3 GHz, an average CPI of 0.75, and requires the execution of 1.0E9 instructions. 1. One usual fallacy is to consider the computer with the largest clock rate as having the largest performance. Check if this is true for P1 and P2. 2. Another fallacy is to consider that the processor executing the largest number of instructions will need a larger CPU time. Considering that processor P1 is executing a sequence of 1.0E9 instructions and that the CPI of processors P1 and P2 do not change, determine the number of instructions that P2 can execute in the same time that P1 needs to execute 1.0E9 instructions. 3. A common fallacy is to use MIPS (millions of instructions per second) to compare the performance of two different processors, and consider that the processor with the largest MIPS has the largest performance. Check if this is true for P1 and P2. 4. Another common performance figure is MFLOPS (millions of floating-point operations per second), defined as MFLOPS = No. FP operations / (execution time x 1E6) but this figure has the same problems as MIPS. Assume that 40% of the instructions executed on both P1 and P2 are floating-point instructions. Find the MFLOPS figures for the programs.

Answer:

(1) We will use the formula:

                                       CPU time = number of instructions x CPI / Clock rate

So, using the 1 Ghz = 10⁹ Hz, we get that

CPU time₁ = 5 x 10⁹ x 0.9 / 4 Gh

                    = 4.5 x 10⁹ / 4 x 10⁹Hz = 1.125 s

and,

CPU time₂ = 1 x  10⁹ x 0.75 / 3 Ghz

                  = 0.75 x 10⁹ / 3 x 10⁹ Hz = 0.25 s

So, P2 is actually a lot faster than P1 since CPU₂ is less than CPU₁

(2)

     Find the CPU time of P1 using (*)

CPU time₁ = 10⁹ x 0.9 / 4 Ghz

                = 0.9 x 10⁹ / 4 x 10⁹ Hz = 0.225 s

So, we need to find the number of instructions₂ such that  CPU time₂ = 0.225 s. This means that using (*) along with clock rate₂ = 3 Ghz and CPI₂ = 0.75

Therefore,   numbers of instruction₂ x 0.75 / 3 Ghz = 0.225 s

Hence, numbers of instructions₂ = 0.225 x 3 x  10⁹ / 0.75  = 9 x 10⁸

So, P1 can process more instructions than P2 in the same period of time.

(3)

We recall  that:

MIPS = Clock rate / CPI X 10⁶

  So, MIPS₁ = 4GHZ / 0.9 X 10⁶ = 4 X 10⁹HZ / 0.9 X 10⁶ = 4444

        MIPS₂ = 3GHZ / 0.75 X 10⁶ = 3 x 10⁹ / 0.75 X 10⁶ = 4000

So, P1 has the bigger MIPS

(4)

  We now recall that:

MFLOPS = FLOPS Instructions / time x 10⁶

              = 0.4 x instructions / time x 10⁶ = 0.4 MIPS

Therefore,

                  MFLOPS₁ = 1777.6

                  MFLOPS₂ = 1600

Again, P1 has the bigger MFLOPS

You might be interested in
An array of ints, arr, has been declared and initialized. Write the statements needed to reverse the elements in the array. So,
Yuki888 [10]

Answer:

The sample output is below.

The code is attached.

Explanation:

Sample Output:

Original array is: 1 2 457 4 Reversed array is: 4754 2 1

Code to copy:

import java.io.*;

class Main

{

    /*Define the function revArray passing the array

      and its indices.*/

    static void revArray(int arr[], int start, int end)

    {

         /*Declare an integer variable to store the

           first index.*/

         int temp;

         //Check if array is empty.

         if (start >= end)

             return;

         //Store the first index value.

         temp = arr[start];

         //Swap the last index to first index.

         arr[start] = arr[end];

         //Store the temp value to last index.

         arr[end] = temp;

         /*Call the function recursively to swap

           rest of the values.*/

         revArray(arr, start+1, end-1);

    }  

    public static void main (String[] args)

    {

         //Declare and initialize array.

         int[] arr = {1,2,4,5,7,4};

         /*Declare an integer variable to store the

         * length of array.

         */

         int count=0;

         //Set the length of array to count.

         for(int i=0;i<arr.length;i++)

             count++;

         System.out.println("Original array is:");

         ///Print the original array.

         for(int i=0; i<count;i++)

         {

             System.out.print(arr[i]+" ");

         }  

         /*Call the function to reverse the values in

         * the array itself.

         */

         revArray(arr, 0, count-1);

         System.out.println("\nReversed array is:");

         ///Print the reversed array.

         for(int i=0; i<count;i++)

         {

             System.out.print(arr[i]+" ");

         }  

    }

}

5 0
2 years ago
PLEASE HELP PROGRAMMING WILL GIVE BRAINLIEST
JulijaS [17]
The fourth choice is correct.
5 0
2 years ago
Check your tire pressure every _____. A. month B. two months C. six months D. year
ohaa [14]

Answer: I'd say (B) Two months

Explanation: Hope its correct and helps, Good luck :)

6 0
2 years ago
Read 2 more answers
When handling project scope creep, which are two things that all parties involved need to be aware of?
WARRIOR [948]

Additional resource needed for the projects

Additional time needed for the project

<u>Explanation:</u>

In any project handing their will expected diversion and add on requirement, so to complete a project additional time and additional resource is required to finish a project.

As advice due the project details, end user has keep enough buffer for deviations on resource of man power and additional times taken to finish the project.

While design the project each scope of work is measure with additional time to complete the task

Each scope of work is considered as task in project management.

3 0
1 year ago
Design a class named Person and its two subclasses named Student and Employee. Make Faculty and Staff subclasses of Employee. A
harina [27]

Answer:

se explaination

Explanation:

//Design a class named Person

public class Person

{

//A person has a name, address, phone number, and email address.

String name;

String address;

String phone;

String email;

//Constructor with arguments

public Person(String pname,String paddress,String phNum,String pemail)

{

name=pname;

address=paddress;

phone=phNum;

email=pemail;

}

// toString() method to return the name

public String toString()

{

return getClass().getName()+" "+name;

}

}

---------------------------------------------------------

//Student.java

public class Student extends Person

{

//A student has a class status

//(freshman,sophomore, junior, or senior).

//Define the status as a constant.

final int freshman =1;

final int sophomore =2;

final int junior=3;

final int senior=4;

String status="freshman";

//Constructor with arguments

public Student(String name, String address,String phonenumber, String email, int Status)

{

super(name,address,phonenumber,email);

if(Status == 1)

{

status = "freshman";

}

if(Status == 2)

{

status = "sophomore";

}

if(Status == 3)

{

status = "junior";

}

if(Status == 4)

{

status = "Senior";

}

status = "Student";

}

public String toString()

{

return super.toString() + " " + status;

}

}

------------------------------------------------------

//Employee.java

public class Employee extends Person

{

//An employee has an office, salary, and date hired.

String office;

double salary;

java.util.Date dateHired;

//Constructor with arguments

public Employee(String name,String address,String phonenumber,String email,String off,double sal)

{

super(name,address,phonenumber,email);

office=off;

salary=sal;

}

public String toString()

{

return (super.toString() + " " + office +" " + salary);

}

}

--------------------------------------------------------

//Faculty.java

public class Faculty extends Employee

{

//A faculty member has office hours and a rank.

String officeHours;

String rank;

//Constructor with arguments

public Faculty(String name,String address,String phonenumber,String email,String off,int salary,String offHours,String ranks)

{

super(name,address,phonenumber,email,off,salary);

officeHours=offHours;

rank=ranks;

}

public String toString()

{

return (super.toString() + " " + officeHours +" " + rank);

}

}

-----------------------------------------------------------------------------

//Staff.java

public class Staff extends Employee

{

//A staff member has a title

String title;

//Constructor with arguments

public Staff(String name,String address,String phonenumber,String email,String off,int salary,String ti t)

{

super(name,address,phonenumber,email,off,salary);

title=ti t;

}

public String toString()

{

return (super.toString() + " " + title);

}

}

3 0
2 years ago
Other questions:
  • Discuss how the user-designer communications gap can cause a good project to go bad.
    8·1 answer
  • Monica needs to work on a document where she has to highlight topics in bold and add emphasis to some words in a paragraph using
    9·1 answer
  • Copy the 10 statements as they appear below into your journal.
    6·2 answers
  • Which one of the following is NOT true about energy conversion devices? Group of answer choices Total Energy Input = Energy Diss
    8·1 answer
  • In a real-world environment, changing granularity requirements might dictate changes in primary key selection, and those changes
    15·1 answer
  • The results of the spec cpu2006 bzip2 benchmark running on an amd barcelona has an instruction count of 2.389e12, an execution t
    13·1 answer
  • Translate the following MIPS code to C. Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3
    8·1 answer
  • Fill in the blanks to make the factorial function return the factorial of n. Then, print the first 10 factorials (from 0 to 9) w
    6·1 answer
  • What is the average number of nodes accessed in search for a particular element in an unordered list? In an ordered list? In an
    6·1 answer
  • Dante has a worksheet shared with multiple users. He would like the ability to approve or reject changes that are made. Which fe
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!