Question

What could be the speedup factor for a program if parallel part was %50 and the...

What could be the speedup factor for a program if parallel part was %50 and the serial part was %50 as well for the following number of threads: 2, 4 and 8.

Homework Answers

Answer #1

Q-> What could be the speedup factor for a program if parallel part was %50 and the serial part was %50 as well for the following number of threads: 2, 4 and 8.

Given:

p = fraction of parallel part of the program = 50% = 0.5

.

let t = no of threads

i) t = 2

speedup = 1 / ( (1-p) + p/t )

=> speedup = 1 / ( 0.5 + 0.5 / 2) = 1.33

.

ii) t = 4

speedup = 1 / ( (1-p) + p/t )

=> speedup = 1 / ( 0.5 + 0.5 / 4) = 1.6

.

iii) t = 8

speedup = 1 / ( (1-p) + p/t )

=> speedup = 1 / ( 0.5 + 0.5 / 8) = 1.77

.

=>

for 2 threads, speedup will be 1.3

for 4 threads, speedup will be 1.6

for 8 threads, speedup will be 1.7

Know the answer?
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
Similar Questions
Another different program consists of a purely sequential part that requires 20 seconds to execute on...
Another different program consists of a purely sequential part that requires 20 seconds to execute on a single-core processor. The sequential part must execute first and is followed by a parallel part containing 4 independent tasks each of which takes 12 seconds to run? a) What is the total execution time for the entire program on the single-core processor? b) Compared to the single-core processor, what is the actual speedup achieved by running the program on a 4-core version of...
For this assignment, you need to write a parallel program in C++ using OpenMP for vector...
For this assignment, you need to write a parallel program in C++ using OpenMP for vector addition. Assume A, B, C are three vectors of equal length. The program will add the corresponding elements of vectors A and B and will store the sum in the corresponding elements in vector C (in other words C[i] = A[i] + B[i]). Every thread should execute an approximately equal number of loop iterations. The only OpenMP directive you are allowed to use is:...
For this assignment you need to write a parallel program in C++ using OpenMP for vector...
For this assignment you need to write a parallel program in C++ using OpenMP for vector addition. Assume A, B, C are three vectors of equal length. The program will add the corresponding elements of vectors A and B and will store the sum in the corresponding elements in vector C (in other words C[i] = A[i] + B[i]). Every thread should execute approximately equal number of loop iterations. The only OpenMP directive you are allowed to use is: #pragma...
java thread question. Could you please give me a multiple thread program example that all threads...
java thread question. Could you please give me a multiple thread program example that all threads run in parallel?
For this assignment, you need to write a parallel program in C++ using OpenMP for vector...
For this assignment, you need to write a parallel program in C++ using OpenMP for vector addition. Assume A, B, C are three vectors of equal length. The program will add the corresponding elements of vectors A and B and will store the sum in the corresponding elements in vector C (in other words C[i] = A[i] + B[i]). Every thread should execute an approximately equal number of loop iterations. The only OpenMP directive you are allowed to use is:...
Consider a multiprocessor system and a multithreaded program written using the many- to-many threading model. Let...
Consider a multiprocessor system and a multithreaded program written using the many- to-many threading model. Let the number of user-level threads in the program be greater than the number of processors in the system. Discuss the performance implications of the following scenarios. 1. The number of kernel threads allocated to the program is less than the number of processors. 2. The number of kernel threads allocated to the program is equal to the number of processors. 3. The number of...
Problem 1: You are working on a program with an execution time of 3.5 days.  You are...
Problem 1: You are working on a program with an execution time of 3.5 days.  You are looking for ways to speed up the program, and have come up with 2 options. Option 1: Optimization that reduces memory access from 35% to 15% of total execution time. Option 2: Reduce the number of I/O operations by a factor of 10.  I/O operations currently make up 22% of the execution time. (A) What is the speedup of option 1? (B) What is the...
C program fractions.c that does the following: 1. The program starts by making the user enter...
C program fractions.c that does the following: 1. The program starts by making the user enter a non-negative integer number a, called the first numerator. If the user enters a negative number, the program repeats the entry. 2. The program then makes the user enter a positive integer number b, called the first denominator. If the user enters a non-positive number, the program repeats the entry. 3. The program then makes the user enter a non-negative integer number c, called...
What effect could the DMM have when inserted into the circuit in parallel? In series?
What effect could the DMM have when inserted into the circuit in parallel? In series?
Complete the following program. This program should do the following: 1. Creates a random integer in...
Complete the following program. This program should do the following: 1. Creates a random integer in the range 10 to 15 for variable: allThreads, to create a number of threads. 2. Creates a random integer for the size of an ArrayList: size. 3. Each thread obtains a smallest number of a segment of the array. To give qual sized segment to each thread we make the size of the array divisible by the number of threads: while(size%allThreads != 0)size++ 4....