Parallel Algorithm Merged
Parallel Algorithm Merged
Parallel Algorithm Merged
CEN-704
VII Semester Examination 2018
B.Tech.(Computer Engineering),
Parallel and Distributed Computing
Max. Marks:-60
Time:-03 Hours
CO1
Q14) a new architecture:
following speed ups are proposed for
Three enhancements with the
one enhancement is usable at a time.
Speedupl-30, speedup2-20, and peedup3 =15. Only 2 1
Assume the enhancements can be used 25%,35% and 10% of the time for enhancements
no enhancement in use?
and 3 respectively. For what fraction of the reduced execution time is
enhancements should be used? 06
If only two enhancements are to be used then which two
Gi) Let a be the percentagee of program code that can be executed simultaneously by n
computers in a cluster, each computer using a difierent set of parameters or initial conditions.
Assume that the remaining code must be executed simultaneously by a single processor. Each
processor has an execution rate of x MIPS. Determine an expression for the effective MIPS rate
when using the system for exclusive execution of this program in terms of a, n and x. 03
Q1
().Consider a computer which can execute a program in two operational modes; regular mode
versus enhanced mode with a probability distribution of {A, 1-A} respectively. If A varies
between a and b and 0O<=a<=1, derive an expression for the average speedup factor using
harmonic mean concept. 06
CO2
06
of suitable examples and diagrams.
Q2a) Describe Branch prediction techniques with help
Q2(b)
(i)Derive an expression for optimal number of stages in a pipeline. 02
Q2(c) Three functional pipelines fl, f2 and f3 are characterized by the following reservation
tables. 06
Mux F1 F2
:
A F3
BMux
output
Each task going through this composite pipeline in the following order: f1 first, 2 and f3 next, f1
again and then the output is obtained. The dual multiplexer selects a pair of inputs (A,B) or
(X,Y) and feeds them into the input of fl.
(i) Draw the state transition diagram for collision free scheduling
ii)List all simple cycle and greedy cycle
(ii)Find MAL
reservation table.
CO3
Q3 (a) Design and verify SIMD
complexity as O(N ). algorithm for NXN Matrix multiplication with computational
Q3 6) What is PRAM model? Design and verify PRAM 06
Algorithm for EREW NXN matrix
multiplication with computational complexity of O(N). 06
Q3(¢) Parallelize Quick Sort Algorithm. Compute its speced up with respect to its
algorithm. sequential
06
CO4
Q4(a ). What is MPI program? Write an MPI program for computing the values of N! 06
Q46) What do you mean by Open Mp program ? Write an open MP program to compute the
value of PI 06
4(0) Explain the following terms () GPU (Gi) cUDA. Explain how a CUDA program is written
with help of suitable example. Revise 06
COS
Q5. Describe in details any two of the following with the help of suitable examples and
diagrams.
(a)Mobile Agent
(6) Object request Broker
P0 P1 P2 PN
P0 + P1 + P2 + P3 + Step 1
P0 + P2 + Step 2
P0 + Step 3
• Program in P(i)
• L=n
• Repeat
• L=L/2
• If(i<L) then begin
• read A[2i] from SM
• Read A[2i+1] from SM
• Compute sum=A[2i]+A[2i+1]
• store in A[i]
• Until(L=1)
PRAM Algorithm (Parallel Addition)
• Log (n) steps = time needed
• n / 2 processors needed
• Speed-up = n / log(n)
• Efficiency = 1 / log(n)
• Applicable for other operations
• +, *, <, >, etc.
Another algorithm to find sum
• Program in P(i)
• L=n
• Repeat
• L=L/2
• If(i<L) then begin
• read A[i] from SM
• Read A[i+L] from SM
• Compute sum of (A[i]and A[i+L])
• store in A[i]
• Until(L=1)
Program to find maximum of N nos
• Program in P(i)
• L=n
• Repeat
• L=L/2
• If(i<L) then begin
• read A[i] from SM
• Read A[i+L] from SM
• Compute Max(A[i],A[i+L])
• store in A[i]
• Until(L=1)
Program to find minimum of N nos
• Program in P(i)
• L=n
• Repeat
• L=L/2
• If(i<L) then begin
• read A[i] from SM
• Read A[i+L] from SM
• Compute Min(A[i],A[i+L])
• store in A[i]
• Until(L=1)
Program to find Product of N nos
• Program in P(i)
• L=n
• Repeat
• L=L/2
• If(i<L) then begin
• read A[i] from SM
• Read A[i+L] from SM
• Compute Product(A[i],A[i+L])
• store in A[i]
• Until(L=1)
Program to find sum of N nos using M
processors
• Program in P(I)
• sum=0