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.
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
Get Answers For Free
Most questions answered within 1 hours.