Assume we have a computer where the clocks per instruction (CPI) is 1.0 when all memory accesses hit in the cache. The only data accesses are loads and stores, and these total take 40% of the instructions. If the miss penalty is 200 clock cycles and the miss rate is 2% for I-Cache and 5% for D-cache, how much faster would the computer be if all instructions were cache hits

Answers

Answer 1

Answer:

6.6 times faster considering I-cache

Explanation:

Given data :

CPI  = 1

Data accesses ( loads and stores ) = 40% of instructions

Miss penalty = 200 clock cycles

Miss rate = 2% for I-cache ,  5% for D-cache

Determine how much faster the computer will be if all instructions were Cache hits

In this condition the memory stall = 0

hence: CPU ideal time = ( Ic * CP1  + memory stall ) * clock cycle time --- ( 1 )

                                     = ( Ic * 1 + 0 ) * clock cycle time

Note : Memory stall = Ic * ( 1 + load fraction ) * miss rate * miss penalty  --- ( 2)

back to equation 1

Memory stall ( for I-cache ) = Ic * ( 1 + 40% ) * 2% * 200

                                              = 5.6 Ic

Input value into equation 1

CPU ideal time = Ic * 1 + 5.6Ic * clock cycle time

                         = ( 6.6 Ic ) * clock cycle time

To determine how much faster we take the ratio of the CPU ideal time

=   6.6 Ic * clock cycle time / 1  Ic * clock cycle time

= 6.6 times faster


Related Questions

Write a method called lexLargest that takes a string object argument containing some text. Your method should return the lexicographical largest word in the String object (that is, the one that would appear latest in the dictionary).

Answers

Answer:

public static String lexLargest(String text){

       //split the text based on whitespace into individual strings

       //store in an array called words

       String[] words = text.split("\\s");

       

       //create and initialize a temporary variable

       int temp = 0;

       

       //loop through the words array and start comparing

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

           

           //By ignoring case,

           //check if a word at the given index i,

           //is lexicographically greater than the one specified by

           //the temp variable.

          if(words[i].compareToIgnoreCase(words[temp]) > 0){

               

               //if it is, change the value of the temp variable to the index i

              temp = i;

           }    

       }

       

       //return the word given by the index specified in the temp

               // variable

       return words[temp];

    }

Sample Output:

If the text is "This is my name again", output will be This

If the text is "My test", output will be test

Explanation:

The code above has been written in Java. It contains comments explaining the code. Sample outputs have also been given.

However, it is worth to note the method that does the actual computation for the lexicographical arrangement. The method is compareToIgnoreCase().

This method, ignoring their cases, compares two strings.

It returns 0 if the first string and the second string are equal.

It returns a positive number if the first string is greater than the second string.

It returns a negative number if the first string is less than the second string.

Select the correct term to complete the sentence.
The
file format is used for video files.

A. .pptx

B. .mp3

C. .jpeg

D. .mp4

Answers

Answer: D. mp4

its mp4 because its always on video files

Second Largest, Second Smallest Write a program second.cpp that takes in a sequence of integers, and prints the second largest number and the second smallest number. Note that in the case of repeated numbers, we really mean the second largest and smallest out of the distinct numbers (as seen in the examples below). You may only use the headers: and . Please have the output formatted exactly like the following examples: (the red is user input) Enter integers (Q to quit): 1 2 1 8 8 9 Q Second largest: 8 Second smallest: 2 Enter integers (Q to quit): -7 -101 0 -2 17 Q Second largest: 0 Second smallest: -7

Answers

Answer:

The program in C++ is as follows:

#include <vector>

#include <iostream>

using namespace std;

int main(){

   vector <int> my_num;

   string sentinel;

   int n = 0;

   cout<<"Enter integers (Q to quit): ";

   cin>>sentinel;

   while(sentinel != "Q"){

       my_num.push_back(stoi(sentinel));

       n++;

       cin>>sentinel;    }

      int n1, n2;

      n1 = my_num.at(0);      n2 = my_num.at(1);

      if(my_num.at(0)<my_num.at(1)){     n1 = my_num.at(1);  n2 = my_num.at(0);   }

      for (int i = 2; i< n ; i ++) {

          if (my_num.at(i) > n1) {

              n2 = n1;

              n1 = my_num.at(i);     }

           else if (my_num.at(i) > n2 && my_num.at(i) != n1) {

               n2 = my_num.at(i);     }  }

       cout<<"Second Largest: "<<n2<<endl;

       n1 = my_num.at(1);       n2 = my_num.at(0);

       if(my_num.at(0)<my_num.at(1)){ n1 = my_num.at(0);  n2 = my_num.at(1);   }

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

           if(n1>my_num.at(i)) {  

               n2 = n1;

               n1 = my_num.at(i);            }

           else if(my_num.at(i) < n2){

               n2 = my_num.at(i);     }  }

 cout<<"Second Smallest: "<<n2;

 return 0;

}

Explanation:

See attachment for explanation

Write a program to find the sum and product of all elements of an array of size 10. Take input from user.

Answers

Answer:

mark me brainleist

Explanation:

#include<iostream>

using namespace std;

int main ()

{

   int arr[10], n, i, sum = 0, pro = 1;

   cout << "Enter the size of the array : ";

   cin >> n;

   cout << "\nEnter the elements of the array : ";

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

   cin >> arr[i];

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

   {

       sum += arr[i];

       pro *= arr[i];

   }

   cout << "\nSum of array elements : " << sum;

   cout << "\nProduct of array elements : " << pro;

   return 0;

}

A network-based attack where one attacking machine overwhelms a target with traffic is a(n) _______ attack.

Answers

HELLO!

Answer:

''Denial of Service'' also known as ''DoS''

Explanation:

It's ''Denial of service'' this is because it means an attack that mean to be shutting down a machine or network. So, ''Denial of Service'' best fits in this sentence.

Difference between computer hardware and computer software

Answers

Answer: Computer hardware is computer parts for the computer such as keyboards, mouses, and monitors. Computer software is a program on the computer where you can download it and that software you downloaded adds data to the computer that tells it how to work, etc.

Hope this helps :)

Explanation: N/A

Write a recursive function that has an argument that is an array of characters and two arguments that are bounds on array indexes. The function should reverse the order of those entries in the array whose indexes are between the two bounds. For example, if the array is a[0]

Answers

Answer:

The function is as follows:

void revArray(char arr[], unsigned int low, unsigned int high)  {  

      if (low >= high){

        return;  }

  swap(arr[low], arr[high]);  

  revArray(arr, low + 1, high - 1);  }

Explanation:

This declares the function. It receives a char array and the lower and upper bounds to be reversed

void revArray(char arr[], unsigned int low, unsigned int high)  {  

This is the base case of the recursion (lower bound greater than or equal to the upper bound).

      if (low >= high){

        return;  }

This swaps alternate array elements

  swap(arr[low], arr[high]);  

This calls the function for another swap operation

  revArray(arr, low + 1, high - 1);  }

g An OpenCl Compute Unit is composed of: Group of answer choices Processing Elements Devices Streaming Multiprocessors Platforms

Answers

Answer:

Processing Elements

Explanation:

Machine and assembly are referred to as a low level programming language used in writing software programs or applications with respect to computer hardware and architecture. Machine language is generally written in 0s and 1s, and as such are cryptic in nature, making them unreadable by humans but understandable to computers.

OpenCl is an abbreviation for open computing language.

An OpenCl Compute Unit is composed of processing elements.

write a program to enter 30 integer numbers into an array and display​

Answers

Answer:

i764

Explanation:

Answer:

Explanation:

Python:

numberlist = []

for i in range(0, 29):

   a = input("Enter a number: ")

   numberlist[i] = a

print(*meh, sep = "\n")

What will be the output of the following JavaScript code? functioncomparison() { int number=10; if(number= = ="10") return true; else return false; } Single choice. (0.5 Points) True false runtime error compilation error

Answers

Answer:

(b) false

Explanation:

Given

The above code

Required

The expected output

First, variable number is declared as integer and then initialized with 10

Next, the === compares the integer 10 with string "10"

10 and "10" are different type and === will return true if the compared values and/or variables are of the same type.

Since 10 and "10" are different, the expected output is false

The output of the following JavaScript code is false.

Let's write the code appropriately,

functioncomparison() {

int number = 10;

if (number= = ="10")

return true;

else

return false;

}

A function  functioncomparison() is declared.

Then the integer number is assigned as 10.

The conditional "if" says if the string 10 is equals to the integer number 10.

The triple equals signs(===)check for the type and the actual value.

The string "10" and integer 10 are not the same type. "10" is a string and 10 is an integer.

Therefore, the output of the code will be false.

learn more about JavaScript conditional here:  https://brainly.com/question/17115445?referrer=searchResults

Given a member function named set_age() with a parameter named age in a class named Employee, what code would you use within the function to set the value of the corresponding data member if the data member has the same name as the parameter

Answers

Answer:

Explanation:

This would be considered a setter method. In most languages the parameter of the setter method is the same as the variable that we are passing the value to. Therefore, within the function you need to call the instance variable and make it equal to the parameter being passed. It seems that from the function name this is being written in python. Therefore, the following python code will show you an example of the Employee class and the set_age() method.

class Employee:

   age = 0

   

   def __init__(self):

       pass

   

   def set_age(self, age):

       self.age = age

As you can see in the above code the instance age variable is targeted using the self keyword in Python and is passed the parameter age to the instance variable.        

At Greenwood ATCT, arrival information need NOT be forwarded while FDIO is operational unless the sequence of aircraft changes and/or the __________.

Answers

The available options are:

A. Arrival time differs by more than 3 minutes

B. Aircraft is issued an approach other than the tower specified

C. Verbal coordination has not been yet accomplished

Answer:

Aircraft is issued an approach other than the tower specified

Explanation:

Considering the situation described in the question, and according to Instrument Flight Rules (IFR), Approach Clearance Procedures, when at Greenwood Air Traffic Control Tower (ACTC), arrival information need not be forwarded while Flight Data Input-Output (FDIO) operational unless the sequence of aircraft changes and the "Aircraft is issued an approach other than the tower specified."

Linda wants to change the color of the SmartArt that she has used in her spreadsheet. To do so, she clicks on the shape in the SmartArt graphic. She then clicks on the arrow next to Shape Fill under Drawing Tools, on the Format tab, in the Shape Styles group. Linda then selects an option from the menu that appears, and under the Colors Dialog box and Standard, she chooses the color she wants the SmartArt to be and clicks OK. What can the option that she selected from the menu under Shape Fill be

Answers

Answer: Theme colors

Explanation:

Based on the directions, Linda most probably went to the "Theme colors" option as shown in the attachment below. Theme colors enables one to change the color of their smart shape.

It is located in the "Format tab" which is under "Drawing tools" in the more recent Excel versions. Under the format tab it is located in the Shape Styles group as shown below.

In python, Create a conditional expression that evaluates to string "negative" if user_val is less than 0, and "non-negative" otherwise.

Answers

I am assuming that user_val is an inputted variable and a whole number (int)...

user_val = int(input("Enter a number: "))

if user_val < 0:

   print("negative")

else:

   print("non-negative")

11
The spreadsheet above indicates the number of Science graduates from a college during
period 2001 - 2003.
Use the following spreadsheet to answer the following questions 12 to 16. u
A
B
с
D
E
F
2001
2002
2003
Total
Chemisin
TOD
75
65
Biolo
70
Physics
15
5​

Answers

Answer:

need help too

Explanation:

Write a program to implement problem statement below; provide the menu for input N and number of experiment M to calculate average time on M runs. randomly generated list. State your estimate on the BigO number of your algorithm/program logic. (we discussed in the class) Measure the performance of your program by given different N with randomly generated list with multiple experiment of Ns against time to draw the BigO graph (using excel) we discussed during the lecture.

Answers

Answer:

Explanation:

#include<iostream>

#include<ctime>

#include<bits/stdc++.h>

using namespace std;

double calculate(double arr[], int l)

{

double avg=0.0;

int x;

for(x=0;x<l;x++)

{

avg+=arr[x];

}

avg/=l;

return avg;

}

int biggest(int arr[], int n)

{

int x,idx,big=-1;

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

{

if(arr[x]>big)

{

big=arr[x];

idx=x;

}

}

return idx;

}

int main()

{

vector<pair<int,double> >result;

cout<<"Enter 1 for iteration\nEnter 2 for exit\n";

int choice;

cin>>choice;

while(choice!=2)

{

int n,m;

cout<<"Enter N"<<endl;

cin>>n;

cout<<"Enter M"<<endl;

cin>>m;

int c=m;

double running_time[c];

while(c>0)

{

int arr[n];

int x;

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

{

arr[x] = rand();

}

clock_t start = clock();

int pos = biggest(arr,n);

clock_t t_end = clock();

c--;

running_time[c] = 1000.0*(t_end-start)/CLOCKS_PER_SEC;

}

double avg_running_time = calculate(running_time,m);

result.push_back(make_pair(n,avg_running_time));

cout<<"Enter 1 for iteration\nEnter 2 for exit\n";

cin>>choice;

}

for(int x=0;x<result.size();x++)

{

cout<<result[x].first<<" "<<result[x].second<<endl;

}

}

In BSD socket API,which call is used for transmitting data in the connectionless mode?

Answers

Answer:

UDP is the answer

Explanation:

UDP enables best-effort connectionless transfer to individual block of information, while TCP enables reliable transfer of a stream of bytes. That's two modes of services available through the circuit interface, connection-oriented and connection-less.

Question #4
Math Formula
What will you see on the next line?
>>>int(3.9)

Answers

Answer:

3

Explanation:

The correct answer is 3. The int() function truncates the decimal part.

-Edge 2022

tell me the most scariest website you know and i'll give you brainlest

Answers

Answer:

it's not a website but on insta there's an account that freezes people's phone when you click on their story.

Explanation:

Write a 3-4 page paper (500-800 words) about your project that explains your project, the type of conditioning you used, and the methods and procedures used to execute your project. You should explain the process of shaping the behavior and utilize any or all appropriate vocabulary. Finally, include a discussion of the results and an analysis of recommendations for improvement or future changes.

Answers

Answer:

Following are the responses to the given question:

Explanation:

I have decided to take up my project as a change in my behavior of not working out and exercising on daily basis. To execute this project, I decided to use ‘Operant conditioning’ to be able to complete it successfully. The reason for choosing this as my project is to be able to change my unhealthy behavior of not exercising daily, which is now having an impact on my weight as well as on my mind.

Operant Conditioning is also known as instrumental conditioning was used by the behaviorist B.F Skinner. Through operant conditioning, Skinner explained how we adapt to several learned behaviors in our everyday life. Its idea of such conditioning would be that the acts that accompany reinforcement will most likely occur in the future.

They may call it a punishment for actions and retribution. A relationship is formed between that action as well as its consequences. I began my project with an order of a watch to keep track of my daily workout and even downloaded a phone-based software to track my calorie each day. The concept behind it was to understand my everyday work and my calorie consumption because these variables inspire me to choose more to achieve my aim to practice and maintain my weight safely.

So, to find any way to miss it I did the routine calendar. We also made a small and comprehensive strategy for the first few weeks such as early awakening and 10 minutes getting warmed up. I concentrated on the operating conditioning function and reaction. I've been honored by enjoying my important topics for one hour every week that I finished my practice according to my planned routine. I wanted and award myself quarterly rewards in addition to daily rewards. When the goal of a daily exercise is also achieved, I decided to go out to my favorite coffee just at end of November.

It's not a matter of giving one of my favorite stuff to my cousins to affirm my everyday life except for one year within a week (except when I'm unwell). The fear of missing one of my items that I'd always agreed only at beginning of the week prevented me from achieving my target of exercise every day and made me very content to go to my favorite coffee shop. It made it more motivating for someone like me to proceed with the positive and negative reinforcement of doing my everyday exercise routine. I also get used to my fresh and safe routine every day, but also the results are impressive.

Even though I don't feel about rewarding myself with something that I like, I am very much happy because of the positive result which I have a fit body and maintain a healthy lifestyle. Those who removed my daily positive and negative exercise reinforcements, as well as the monthly incentive, could not be required in the future. Moreover, I can work on a closer look for 6 abs.

A(n) ________ is a small program that resides on a server and is designed to be downloaded and run on a client computer.

Answers

Answer:

applet

Explanation:

A(n) applet is a small program that resides on a server and is designed to be downloaded and run on a client computer.

Why computer is known as versatile and diligent device? Explain​

Answers

They work at a constant speed to do the task. Unlike a human, they will not slow down or get bored or start making mistakes that they were not doing earlier. So once they are programmed correctly to do a task, they will do it diligently.

They are versatile because they can be used for all sorts of tasks. They can also do many of the same tasks in different ways. They are diligent because they will do a task thoroughly until it is finished.

Upang mas maging maganda ang larawang ini-edit, dapat isaalang-alang ang tatlong mahahalagang elemento. Ano-ano ang mga ito?​

Answers

Answer:

is this english?

Explanation:

list and describe each of the activities of technology

Answers

Answer:

network has led to exposure of dirty things to young ones.

air transport has led to losing of lives

Write a function that displays the character that appears most frequently in the string. If several characters have the same highest frequency, displays the first character with that frequency. Note that you must use dictionary to count the frequency of each letter in the input string. NO credit will be given without using dictionary in your program

Answers

Answer:

The function is as follows:

def getMode(str):

occurrence = [0] * 256

dict = {}

for i in str:

 occurrence[ord(i)]+=1;

 dict[i] = occurrence[ord(i)]

 

highest = max(dict, key=dict.get)

print(highest)

Explanation:

This defines the function

def getMode(str):

This initializes the occurrence list to 0

occurrence = [0] * 256

This creates an empty dictionary

dict = {}

This iterates through the input string

for i in str:

This counts the occurrence of each string

 occurrence[ord(i)]+=1;

The string and its occurrence are then appended to the dictionary

 dict[i] = occurrence[ord(i)]

This gets the key with the highest value (i.e. the mode)

highest = max(dict, key=dict.get)

This prints the key

print(highest)

What is the purpose of the property, transition-timing-function?
It sets how many times a transition will play.
It delays the start of a transition by a set number of seconds.
It changes the speed at different stages of the transition.
It adds a pause between steps in an animation.

Answers

Answer:

It changes the speed at different stages of the transition.

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of the HTML document contains the contents or informations that a web page displays.

Basically, the purpose of the property, transition-timing-function is that It changes the speed at different stages of the transition. Thus, it states the values between the beginning and ending of a transition are calculated over its duration.

Suppose the CashRegister needs to support a method void undo() that undoes the addition of the preceding item. This enables a cashier to quickly undo a mistake. What instance variables should you add to the CashRegister class to support this modification

Answers

Answer:

previousAddition instance variable

Explanation:

In order to accomplish this you would need to add a previousAddition instance variable. In this variable you would need to save the amount that was added at the end of the process. Therefore, if a mistake were to occur you can simply call the previousAddition variable which would have that amount and subtract it from the total. This would quickly reverse the mistake, and can be easily called from the undo() method.

1. A problem can be solved recursively if it can be broken down into successive smaller problems that are unique within the overall problem.
a. True
b. False

2. It always is possible to replace a recursion by an iteration and vice versa.
a. True
b. False

3. A recursive method without a base case leads to infinite recursion.
a. True
b. False

4. Since iterative solutions often use loop variables and recursive solutions do not, the recursive solution is usually more memory efficient (uses less memory) than the equivalent iterative solution.
a. True
b. False

5. Some problems are easier to solve recursively than iteratively.
a. True
b. False

Answers

Answer:

(1) True

(2) True

(3) True

(4) False

(5) True

Explanation:

The essence of recursive function is to perform repetitive operation until the base case (or a condition) is met.

Using this analogy, we have

(1) True: The base case and other cases are instance of smaller units of a recursion. Hence, this option is true

(2) True: As explained earlier, recursions are used for repetitive operations (i.e. iteration); Hence, both can be used interchangeable

(3) True: The essence of the base case is to end the recursion. Without it, there will be an indefinite recursion

(4) False: This is false because recursions are not really memory efficient when compared to loops (e.g. for loops, while loops, etc.)

(5) True: This is sometimes true because at times it is better to solve a problem using recursions.

For which two reasons might a designer use contrasting colors on a web page?

Answers

Check box 2 and 3. Those are both correct.
Contrasting colours are bound to bring attention to certain things such as messages and it could also be a pretty aesthetic which is appealing and will improve and boost interactions

Can someone help me with this coding project


And sorry for the bad quality

Answers

Answer:

PART 1

if (isNan(num1) || isNan(num2)){

   throw 'Error';

}

PART 2

catch(e){

   document.getElementById("answer").innerHTML = "Error!";

}

Other Questions
Select the correct answer.What should you keep in mind when picking a topic for a research paper?.choosing a general topicOB.choosing a topic that is relatively newO C.choosing a specific topic rather than a broad oneOD. choosing a topic based on the most number of sources you can findResetNext PLEASE HELP AND DO NOT SEND A LINK IF YOU DO YOU WILL BE REPORTEDI need help with this I don't know if I'm getting this right please help and give explanations as well and if you don't know both of the question please answer one1.Three glasses A, B, C contain the liquids: deionized water in A, sulfuric acid solution in B and sodium hydroxide solution in C. Arrange the liquids of the three glasses in order of increasing pH2.What values can the pH of a base solution at 25oC take? Ideas sobre la participacin igualitaria en las designaciones y elecciones de las autoridades en la historia del pas What is the value of b when the expression-6.2x + b is equivalent to -3.1(2x - 3) what is the value of x ? please help me!!! Ms. Goldstein is required by the plan she represents to obtain enrollment forms that have carbon copies in the back. She gives one to the beneficiary, sends another to the plan and retains the third. What should she do with her copies of the enrollment forms? Historical events and persons mentioned or alluded to in a story can help the reader better understand the-author's life-genre of the story-accuracy of the story-characters, setting, and plot of the story Aakriti bought a tray of eggs from a shop. She found that 6 eggs were rotten and 5 eggs were broken in the total of 40. Find the ratio of:(i) good eggs to rotten eggs(ii) broken eggs to good eggs(iii) rotten eggs to broken eggs. Mark has been participating in a vigorous exercise routine for the past three months. However, around the start of the third month, he noticed he stopped making gains in his strength and cardiovascular endurance. Recommend two suggestions to Mark that would allow him to continue to improve his strength. i .... all the graves yesterday in VDJ recombination occurs in the Group of answer choices variable region of the heavy chain. constant region of the light chain. variable region of the light chain. Both the light and heavy chain. Resources from the clinical area you work in and discuss how this Resources is maintained and monitored? Hypothetical element A has three stable isotopes. The first isotope has a mass of 35.01 amu and an abundance of 35.00%. The second isotope has a mass of 36.01 amu and an abundance of 15.00%. The third isotope has a mass of 37.02 amu and an abundance of 50.00%. What is the atomic mass of element A Explain the poetic. You don't have to feel like a waste of spaceYou're original, cannot be replacedIf you only knew what the future holdsAfter a hurricane comes a rainbow please hurry no links eitherrr asnwer this its khan academy i only get one try If c = 5 what is the perimeter of the house?Im marking branliest 21. Which of the following is the definition for a detail drawing?A. It is a drawing plan made according to a scale, smaller than the actual work.B. It is a drawing which resembles a respective drawing.C. It is a separate drawing showing a small part of a machine or structure.D. It is the representation of an object on a plan surface, pertaining to materials, styles and finish presented asto have the same appearances as when seen from a viewpoint.ANSWER THE FOLLOWING QUESTIONS Roper works 40 hours per week regularly , at a rate of 16.20 per hour. When he works over time his rate is time and a half of his regularly hourly rate . What is his hourly overtime rate ? A) 24.30B)25.67C)26.50D)27.54 60 POINTS!!!!!!!!!! Do you think Judges are truly independent of any political party?