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
alexandr1967 [171]
2 years ago
14

Consider two different implementations, M1 and M2, of the same instruction set. There are five classes of instructions (A, B, C,

D, and E) in the instruction set M2 has a clock rate of 3,300 MHz. The average number of cycles for each instruction class and their frequencies (for a typical program) are as follows:
Instruction Class Machine M1 Machine M2 Frequency
Cycles/Instruction
Frequency
A 1 2 60%
B 2 3 30%
C 4 4 10%
(a) Calculate the average CPI for each machine, M1, and M2.
(b) Calculate the average MIPS ratings for each machine, M1 and M2.
(c) Which machine has a smaller MIPS rating? Which individual instruction class CPI do you need to change, and by how much, to have this machine have the same or better performance as the machine with the higher MIPS rating (you can only change the CPI for one of the instruction classes on the slower machine)?
Computers and Technology
1 answer:
r-ruslan [8.4K]2 years ago
7 0

Answer:

Kindly check explanation

Explanation:

Given the table :

Class___M1____M2____frequency

A______1______2______60%

B______2______3______30%

C______4______4______10%

A) Average CPI for each machine M1 and M2:

Frequency * cycles :

For M1:

(60% × 1) + (30% × 2) + (10% × 4)

0.6 + 0.6 + 0.4 = 1.6

For M2:

(60% × 2) + (30% × 3) + (10% × 4)

1.2 + 0.9 + 0.4 = 2.5

Calculate the average MIPS ratings for each machine, M1 and M2.

MIPS = clockrate / average CPI × 10^6

Clock rate for M1 isnt given

However, clock rate for M2 = 3,300

For M2 = (3300/2.5 ×10^6 = 0.00132

You might be interested in
Using direct mapping, consider a 16-bit memory addresses, and a cache with 64 blocks, where each block is 8 bytes. What is the s
spin [16.1K]

Answer:

Tag          Block             Offset

 7               6                   3

Explanation:

Using direct mapping hashing:

Memory address size = 16 bits

Number of cache blocks = 64

Size of each block = 8 bytes

Thus;

Offest field = size of each block = 2^{3} = 3 bits

Number of blocks = 64 = 2

Thus, the index field is = 2^{6} = 6 bits of block

Tag filed is of size = 16 - (3+6) = 7 bits of tag

4 0
2 years ago
How does the browser display the same webpage whether you enter the URL or the IP address in the address bar? what system transl
nordsb [41]
Awesome question! I love networking. When you enter a URL into your browser, your computer sends the request to your ISP or internet service provider. Your ISP has a HUGE database that coordinates the IP address to the domain name. This database is called a DNS, or Domain Name Service. So when you submit www.google.com to your ISP, they return look in the DNS and find the IP address. The ISP then returns the IP address to you. Your browser then takes the IP and connects you to the server. The server finally send the index.html file to and your browser and renders it as a web page. 

This all happens in the blink of an eye. The internet is truly amazing :D
6 0
3 years ago
Write a C program that reads a string containing text and nonnegative numbers from the user and prints out the numbers contained
Alex_Xolod [135]

Here is the code in C.

#include <stdio.h>

#include <string.h>

//main function

void main()

{

// character array to store the string

char str[1000];

int len,i,j;

char c,ch;

printf("Please Enter a string: ");

 // read the string

gets(str);

// find the length of input string

len = strlen(str);

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

 {

      c=str[i];

       // if any character of string is digit then it will check

       // until it finds the next non-digit character

     if(c>='0' && c<='9')

     {

         for(j=i;j<len;j++)

         {

             ch=str[j];

             if(ch>='0' && ch<='9')

              //print the number in the string

             printf("%c",str[j]);

             else

             {

                 printf(" ");

                 i=j;

                 break;

             }

         }

     }

 }

}

Explanation:

First it ask user to input a string and store that string into character array.Then travers the array and find first digit character.If a digit is found then print that digit.After that in the inner for loop, check next character is digit or not, if a digit meets then print that digit.Repeat this until the next non-digit character founds.When a non-digit character meets print a space and update the value of "i" and break the inner loop.It will again check the same from the ith index in the character array.

Output:

Please Enter a string: The year has 365 days and the day has 12 hours

365 12

6 0
3 years ago
1. Write a program to prompt the user to enter a single character and respond back whether or not the character is valid dna. 2.
Nina [5.8K]

Answer:

Answer 1:

dna = input("Enter DNA type: ")

dna = dna.upper()

print(dna)

if dna == "A" or dna == "B" or dna == "Z":

   print("valid")

else:

   print("invalid")

Answer 2:

rna = input("Enter DNA type: ")

rna = rna.lower()

print(rna)

if rna == "m" or rna == "t" or rna == "r":

   print("valid")

else:

   print("invalid")

Answer 3:

dnaSquence = input("Enter the DNA sequence: ")

type = "valid"

for char in dnaSquence:

   if char not in ["A", "C", "G", "T"]:

       type = "invalid"

       break

print(type)

Answer 4:

rnaSquence = input("Enter the RNA sequence: ")

type = "valid"

for char in rnaSquence:

   if char not in ["A", "C", "G", "U"]:

       type = "invalid"

       break

print("valid")

Explanation:

There are three types of DNA; Type A, Type B and Type Z.

A DNA sequence consists of; A, C, G and T.

There are three types of RNA; mRNA, tRNA and rRNA.

An RNA sequence consists of; A, C, G and U.

Code Explanations:

Code 1:

dna = input("Enter DNA type: ")

dna = dna.upper()

print(dna)

if dna == "A" or dna == "B" or dna == "Z":

   print("valid")

else:

<em>    print("invalid")</em>

  1. prompts and Takes a single character input
  2. converts the character to upper case
  3. compares the input to the DNA types
  4. Prints "valid" for a valid input else prints "invalid"

Code 2:

rna = input("Enter DNA type: ")

rna = rna.lower()

print(rna)

if rna == "m" or rna == "t" or rna == "r":

   print("valid")

else:

<em>    print("invalid")</em>

<em />

  1. prompts and Takes a single character input
  2. converts the character to lower case
  3. compares the input to the RNA types
  4. Prints "valid" for a valid input else prints "invalid"

Code 3:

Answer 3:

dnaSquence = input("Enter the DNA sequence: ")

type = "valid"

for char in dnaSquence:

   if char not in ["A", "C", "G", "T"]:

       type = "invalid"

       break

print(type)

  1. It prompts for a DNA sequence.
  2. Declares a string variable "type" and initializes type to valid.
  3. The FOR loop checks every character in the DNA sequence.
  4. If the character is not in the list [A, C, G, T] type becomes invalid and the loop breaks and the type "invalid" is printed to the screen.
  5. if all the characters are in the list, then type will remain valid and will be printed to the screen.

Code 4:

rnaSquence = input("Enter the RNA sequence: ")

type = "valid"

for char in rnaSquence:

   if char not in ["A", "C", "G", "U"]:

       type = "invalid"

       break

print("valid")

  1. It prompts for a RNA sequence.
  2. Declares a string variable "type" and initializes type to valid.
  3. The FOR loop checks every character in the RNA sequence.
  4. If the character is not in the list [A, C, G, U] type becomes invalid and the loop breaks and the type "invalid" is printed to the screen.
  5. if all the characters are in the list, then type will remain valid and will be printed to the screen.

7 0
3 years ago
How scientist and technology beliefs society
lana [24]

Answer:

it can introduce cures to sicknesses and it can save lives for example emergency medical equipment

Explanation:

Because its cool

5 0
3 years ago
Other questions:
  • The time between requests to a web server is exponentially distributed with mean 0.5 seconds. NOTE: This is a multi-part questio
    8·2 answers
  • A. True
    8·2 answers
  • The entirety of a packet at one layer becoming the payload section at another layer is known as
    8·2 answers
  • Write a shell script called SpellOutDate that prints the detail of the current date in separate lines. For example if the curren
    13·1 answer
  • 1. What are the built-in operations on classes?
    8·1 answer
  • Which of the following is a technique used by hackers to identify unsecured wireless network locations to other hackers?A. Blues
    10·1 answer
  • The memory unit of a computer has 2M Words of 32 bits (or 4 bytes) each. The computer has an instruction format with 4 fields: a
    14·1 answer
  • Genetics Vocabulary: no <br> Allele: Different versions of the same qene (Aa, Bb)
    11·1 answer
  • WHATS YALL FAVORITE GAME WHOEVER GIVES THE BEST ANSWER WINS 200
    13·2 answers
  • Which insert image option allows a user to compile, modify, and add captions to images?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!