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
Whitepunk [10]
3 years ago
6

Computer A has an overall CPI of 1.3 and can be run at a clock rate of 600 MHz. Computer B has a CPI of 2.5 and can be run at a

clock rate of 750 MHz. We have a particular program we wish to run. When compiled for computer A, this program has exactly 100,000 instructions. How many instructions would the program need to have when compiled for Computer B, in order for the two computers to have exactly the same execution time for this program
Computers and Technology
1 answer:
kirill115 [55]3 years ago
3 0

Answer:

Check the explanation

Explanation:

CPI means Clock cycle per Instruction

given Clock rate 600 MHz then clock time is Cー 1.67nSec clockrate 600M

Execution time is given by following Formula.

Execution Time(CPU time) = CPI*Instruction Count * clock time = \frac{CPI*Instruction Count}{ClockRate}

a)

for system A CPU time is 1.3 * 100, 000 600 106

= 216.67 micro sec.

b)

for system B CPU time is =\frac{2.5*100,000}{750*10^6}

= 333.33 micro sec

c) Since the system B is slower than system A, So the system A executes the given program in less time

Hence take CPU execution time of system B as CPU time of System A.

therefore

216.67 micro = =\frac{2.5*Instruction}{750*10^6}

Instructions = 216.67*750/2.5

= 65001

hence 65001 instruction are needed for executing program By system B. to complete the program as fast as system A

You might be interested in
g Write a program to sort an array of 100,000 random elements using quicksort as follows: Sort the arrays using pivot as the mid
shtirl [24]

Answer:

header.h->function bodies and header files.

#include<iostream>

#include<cstdlib>

#include<ctime>

using namespace std;

/* Partitioning the array on the basis of piv value. */

int Partition(int a[], int bot, int top,string opt)

{

int piv, ind=bot, i, swp;

/*Finding the piv value according to string opt*/

if(opt=="Type1 sort" || opt=="Type3 sort")

{

piv=(top+bot)/2;

}

else if(opt=="Type2 sort" || opt=="Type4 sort")

{

piv=(top+bot)/2;

if((a[top]>=a[piv] && a[top]<=a[bot]) || (a[top]>=a[bot] && a[top]<=a[piv]))

piv=top;

else if((a[bot]>=a[piv] && a[bot]<=a[top]) || (a[bot]>=a[top] && a[bot]<=a[piv]))

piv=bot;

}

swp=a[piv];

a[piv]=a[top];

a[top]=swp;

piv=top;

/*Getting ind of the piv.*/

for(i=bot; i < top; i++)

{

if(a[i] < a[piv])

{

swp=a[i];

a[i]=a[ind];

a[ind]=swp;

ind++;

}

}

swp=a[piv];

a[piv]=a[ind];

a[ind]=swp;

return ind;

}

void QuickSort(int a[], int bot, int top, string opt)

{

int pindex;

if((opt=="Type3 sort" || opt=="Type4 sort") && top-bot<19)

{

/*then insertion sort*/

int swp,ind;

for(int i=bot+1;i<=top;i++){

swp=a[i];

ind=i;

for(int j=i-1;j>=bot;j--){

if(swp<a[j]){

a[j+1]=a[j];

ind=j;

}

else

break;

}

a[ind]=swp;

}

}

else if(bot < top)

{

/* Partitioning the array*/

pindex =Partition(a, bot, top,opt);

/* Recursively implementing QuickSort.*/

QuickSort(a, bot, pindex-1,opt);

QuickSort(a, pindex+1, top,opt);

}

return ;

}

main.cpp->main driver file

#include "header.h"

int main()

{

int n=100000, i;

/*creating randomized array of 100000 numbers between 0 and 100001*/

int arr[n];

int b[n];

for(i = 0; i < n; i++)

arr[i]=(rand() % 100000) + 1;

clock_t t1,t2;

t1=clock();

QuickSort(arr, 0, n-1,"Type1 sort");

t2=clock();

for( i=0;i<n;i++)

arr[i]=b[i];

cout<<"Quick sort time, with pivot middle element:"<<(t2 - t1)*1000/ ( CLOCKS_PER_SEC );

cout<<"\n";

t1=clock();

QuickSort(arr, 0, n-1,"Type2 sort");

t2=clock();

for( i=0;i<n;i++)

arr[i]=b[i];

cout<<"Quick sort time, with pivot median element:"<<(t2 - t1)*1000/ ( CLOCKS_PER_SEC );

cout<<"\n";

t1=clock();

QuickSort(arr, 0, n-1,"Type3 sort");

t2=clock();

for( i=0;i<n;i++)

arr[i]=b[i];

cout<<"Quick sort time and insertion sort time, with pivot middle element:"<<(t2 - t1)*1000/ ( CLOCKS_PER_SEC );

cout<<"\n";

t1=clock();

QuickSort(arr, 0, n-1,"Type4 sort");

t2=clock();

cout<<"Quick sort time and insertion sort time, with pivot median element:"<<(t2 - t1)*1000/ ( CLOCKS_PER_SEC );

return 0;

}

Explanation:

Change the value of n in the main file for different array size. Output is in the same format as mentioned, time is shown in milliseconds.

7 0
3 years ago
Software on your computer is taking a long time to load. What could help solve this problem?
Andrei [34K]

Answer: close the program and reopen it.

Explanation: This is one of the 5 common problems in a computer.  When a program wont load, Try closing and reopening the program.

Reboot the computer.

Check for known issues on the web or updates to the software.

Use Task Manager (Ctrl+Alt+DEL) if program is non-responsive to "end task."

4 0
3 years ago
Percentage-wise, which renewable energy source is used most?
Natasha2012 [34]
C)Hydroelectric I believe.
5 0
3 years ago
When a single controller device communicates with multiple peripheral devices, what wires are simultaneously connected to all de
Tems11 [23]

The wires that are simultaneously connected to all devices in the network are;

SDA(Serial data line) and SCL

Integrated Circuits Communication

This involves I²C which is a form of communication based on integrated circuits.

Now, this I²C is a serial communication interface that has a bidirectional two-wire synchronous serial bus which usually comprises of two wires namely SDA (Serial data line) and SCL (Serial clock line).

Read more about integrated circuits communication at; brainly.com/question/26153031

7 0
2 years ago
In Vista and Windows 7, the Appearance and Personalization option allows you to change the
svetoff [14.1K]
Answer= background
Appearance of the laptop is called theme, it is also related to background
5 0
3 years ago
Other questions:
  • Barr the Bear has started a business to sell fish to Poe and his fellow penguins. The penguin customers submit many fish orders,
    12·1 answer
  • What is the operating system?
    9·1 answer
  • ​In sql server, the cursor property ____________________ means that the cursor is used for retrieval purposes only.
    9·1 answer
  • What are the design concepts and assumptions behind a class, an object and the relationship between them? What are the roles met
    9·1 answer
  • What does intergrated organization mean
    15·1 answer
  • Signs of mastery include?
    10·1 answer
  • Which of the four control methods is best suited for transfer of large blocks of data?
    8·1 answer
  • Which two options are negotiated via ncp during the establishment of a ppp connection that will use the ipv4 network layer proto
    7·1 answer
  • A(n) ______ has moving mechanical parts, which makes it less reliable than solid-state drives, but its metal platters are sealed
    9·2 answers
  • What is another word for: a location in memory that contains a value? A. integer B. Boolean C. variable D. float PLEASE HELP URG
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!