Question

We benchmark a program and find that 80% of the time is spent in functions we...

We benchmark a program and find that 80% of the time is spent in functions we can execute in parallel. What is the maximum possible speedup we can expect? What is the maximum possible speedup if parallelizing this code for only 4 processors? (Explain your calculations).

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If x unit is the total time to execute a program sequentially, then when 80% of the time functions execution can be done parallely, it means only 20% of x I.e. 0.2x unit time will the sequential operation will take place and when we have infinite processors then executing remaining code will take almost zero unit time.

Hence total time taken = 0.2x

Hence the maximum possible speedup = x/0.2x = 5

When there are only 4 processors, then 80% of the parallel functions can be executed by 4 processors by dividing the task into 4 equal parts only(unlike infinite parts in previous part of question).

Hence time taken to process parallel functions = 0.8x/4 = 0.2x

Hence total time taken = time taken to process sequential task + 0.2x = 0.2x + 0.2x = 0.4x

Hence maximum speed up = x/0.4x = 2.5

Please comment for any clarification

Add a comment
Know the answer?
Add Answer to:
We benchmark a program and find that 80% of the time is spent in functions we...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider the speedup gained by a multicore processor over a single processor. Use Amdahl’s law to...

    Consider the speedup gained by a multicore processor over a single processor. Use Amdahl’s law to calculate the speedup for the hypothetical scenarios below. Assume the total execution time of the program is 10 seconds. Assume N is the number of parallel processors. Assume 1-f and f are the execution time (fraction) involving code that is sequential and parallelized, respectively. Show your work and explain the size of the speedup (e.g., none, small, large, etc.). N=1, f=1. N=2, f=0.5 N=3,...

  • You must justify with calculations each of the following questions: System A has 2 processors, program...

    You must justify with calculations each of the following questions: System A has 2 processors, program X takes 10 sec. to execute, in one of the processors. Program Y takes 10 sec. in parallel running to the other processor. System B has only one processor that can run only one program at a time. Program X takes 6 seconds to run on this processor. Program Y takes 6 seconds to run on that processor. Which system would you choose if...

  • In this exercise, assume that we are considering enhancing a quad-core machine by adding encryption hardware...

    In this exercise, assume that we are considering enhancing a quad-core machine by adding encryption hardware to it. When computing encryption operations, it is 20 times faster than the normal mode of execution. We will define the percentage of encryption as the percentage of time in the original execution that is spent performing encryption operations. The specialized hardware increases power consumption by 2%. A: Draw a graph that plots the speedup as a percentage of the computation spent performing encryption....

  • 4. A multi-programmed operating system running on a single CPU assigns time slices of CPU time to the virtual machines that run the individual programs. Each virtual machine is given access to th...

    4. A multi-programmed operating system running on a single CPU assigns time slices of CPU time to the virtual machines that run the individual programs. Each virtual machine is given access to the CPU for a certain time (the time slice), during which it will continue to execute its program. The next time slice then goes to another virtual machine, and so on. Assume that each time slice is one millisecond (1/1000 of a second) long and the computer on...

  • Problem 3. (25 pts.) Compilers can have a profound impact on the performance of an application....

    Problem 3. (25 pts.) Compilers can have a profound impact on the performance of an application. Assume that for a program, compiler A results in a dynamic instruction count of 1 billion instructions and has an execution time of 1.1 seconds, while compiler B results in a dynamic instruction count of 1.2 billion instructions and an execution time of 1.5 seconds. A) Find the average CPI for each program given that the processor has a clock cycle time of 1...

  • Compller A Compler B Execution Ti Execution Time No. Instructions meNo. Instructions b. 1.9 s 1.60E+09 1.30E+09 2.1 s 1...

    Compller A Compler B Execution Ti Execution Time No. Instructions meNo. Instructions b. 1.9 s 1.60E+09 1.30E+09 2.1 s 1.71 [5] <1.4> For the same program, two different compilers are used. The table above shows the execution time of the two different compiled programs. Find the average CPI for each program given that the processor has a clock cycle time of 1 ns. 1.7.2 [5] <1.4> Assume the compiled programs run on two different processors If the execution times on...

  • Design and implement a C Language program that measures the performance of given processors. There are...

    Design and implement a C Language program that measures the performance of given processors. There are several metrics that measure the performance of a processor. We will be using the following 3 measures: 1.CPI (clock cycles per instruction) = #clock cycles /#instructions 2.CPU execution time = #instructions x CPI x clock cycle time . cylce time = 1/CPU clock rate in hertz units 3.MIPS (mega instructions per second)= #instrucrions/ CPU X 1000000 Typically, processors’ performance is measured using a wide...

  • c++, we have to write functions for the code given below and other instructions for it...

    c++, we have to write functions for the code given below and other instructions for it to compile. I am having issues understanding how to confront the problem and how to write functions and read the program so it can eventually be solved so it can be compiled 7/ * INSTRUCTIONS: Write two functions in the space // * indicated below. // * // * #1 => Find index of maximum value: Write a function that will // * find...

  • you are going to write a program, fastfactor, to find all the inegral factors of a...

    you are going to write a program, fastfactor, to find all the inegral factors of a number (integer). the program must be written in C. note that in C (as in most languages) % is a remainder operator, so if x % 3 == 0 that means 3 is a factor of x. you are going to write fastfactor to work like a "standard" UNIX command: the user can invoke the command like fastfactor 12 13 which would output 12:...

  • A certain program is executed on a multi-core system and consists of two parts: Part1 and...

    A certain program is executed on a multi-core system and consists of two parts: Part1 and Part2. Part1 is a single task that is purely sequential and can only be performed by a single processor core. Part2 consists of N independent tasks. Each task in Part2 takes half the time required for the single task in Part1 and must be performed by a single processor core. a) If the number of cores is 16 and N (the number of independent...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT