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
Bess [88]
3 years ago
6

You wrote a C application that takes 20 seconds using your desktop processor. An improved C compiler is released that requires o

nly 0.5 as many instructions as the old compiler. The CPI however increased by 1.3. How fast will the application run when compiled with the new compiler?
Computers and Technology
1 answer:
topjm [15]3 years ago
8 0

Answer:

13 Seconds

Explanation:

Let P1 denotes the performance when old compiler was used to write the C application and P2 denotes the performance when the application is compiled with the new compiler.

CPU time measures of processor performance which is the execution time from the start till end of the program application.

CPU Time of P1 = Instruction count * Average cycles per instruction * Clock cycle time

CPU Time (P1) = I * CPI * T

20 seconds = I * CPI * T

Clock cycle time (T) is also called Clock Rate. So

CPU Time of P1 = Instruction count * Average cycles per instruction * Clock Rate

ClockRate = CPU Time of P1 / Instruction count * Average cycles per instruction

Clock Rate = 20 seconds / (I * CPI )

number of instructions of application = 0.5

Increased CPI = 1.3

The performance of application when compiled with new compiler:

CPU Time of P2 =  Instructions count * Cycles per instruction * Clock Rate

                           = I * CPI * Clock rate

                          = 0.5 * 1.3 * Clock rate

As Clock Rate = 20 seconds / (I * CPI ) So

CPU Time of P2 = (0.5 I ) * 1.3 CPI) * 20/ ( I * CPI)

                          = 0.5 * 1.3 * 20

                          = 13 seconds

So the execution time of application when compiled with new compiler is 13 seconds.

You might be interested in
The Java compiler does not check for an ArrayIndexOutorBoundsException during the compilation of a program containing arrays. O
yulyashka [42]

Answer:

TRUE

Explanation:

  • Let us first understand what is an ArrayIndexOutOfBounds Exception.
  • As the name itself suggests the index for the array has gone out of bound (permissible value) and an exception (anamoly) is resulted.
  • So, it throws an error.
  • That means if an array, Employee of size n is defined then the permissible elements are Employee[0] to Employee[n-1]. If any negative index or with the index is greater than n-1 is tried to access it throws an error saying ArrayIndexOutOfBounds Exception.
  • In java, during the compilation of the program the compiler doesn't check for the ArrayIndexOutOfBounds Exception.It checks during running the program.
  • So, it is called a Runtime Exception.
7 0
3 years ago
If you had three extra siblings, what would be your birth order and what personalities would you like them to have?
Annette [7]

Answer:

mixed personalities l

that will be cool

3 0
3 years ago
Read 2 more answers
Using the find and replace tool would be most appropriate when
mafiozo [28]

A. Changing the company name when the same letter is sent to different companies

The find and replace tool is meant to help replace all instances of a certain piece of text with a different piece of text.

For example, if a letter was sent to Company A, the find and replace tool could change every time the letter says “Company A” and make it say “Company B” instead so the same letter could be sent to Company B.

3 0
3 years ago
Read 2 more answers
You are in the process of replacing the toner cartrige for a laser printer. however, you notice that toner particles have been s
makkiz [27]

Answer:

Toner vacuum

Explanation:

In the process of replacing the toner cartrige for a laser printer, whenever you notice that toner particles have been split inside the printer, what you should use to effectively remove these particles is a TONER VACUUM, it is a device specially created for that purpose, after using a toner vacuum, you can use the activated toner clothe to clean the rest, after which I will advise you to use an aerosol spry to get the best result.

8 0
3 years ago
Susan uploads her newly created files on the web server using FTP. What should she ensure while uploading to prevent other users
galben [10]

Answer:

A, check file permissions

Explanation:

if you don't set proper file permissions people can modify the contents of what you have uploaded to the FTP server

7 0
3 years ago
Read 2 more answers
Other questions:
  • List at least three things that are included as part of property rights.
    10·1 answer
  • Two different names that refer to the same data item best defines:
    12·1 answer
  • Write a brief explanation of the problems that can occur in each of the following scenarios and what you should do to avoid thes
    13·1 answer
  • Which are types of online resources that students can use for help? Check all that apply. simulated labs web-based educational g
    12·2 answers
  • Write a Python program that reads the CSV file, compares the population estimates of every row for 2010 and 2017 and computes th
    10·1 answer
  • Can you get financial aid with average grades
    15·1 answer
  • The staff of the ___________________ will need to enter, maintain, and retrieve data from electronic health records within a hos
    9·1 answer
  • How do the companies gather data to determine common passwords?
    13·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    11·2 answers
  • On the new iOS version, can you save photos from ‘review confirmed photos’? If so, how? Thanks!
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!