Gujarat University
MCA Semester IV
Parallel Processing
Date: 24th July, 2002 Marks:50
Instructions:
1. There are two sections.
2. Answer each section in separate answer books.
Section I
Q-1 Answer the following:
a. Differentiate between ideal speedup and actual speedup. [1]
b. Explain Amdahl’s law in brief. [2]
c. Differentiate between tightly and loosely coupled machines. [2]
d. Derive the speedup formula for block scheduling where excess iterations are distributed among various
processes. [2]
e. What is race condition? How to overcome it? Give example. [2]
Q-2 a. What is meant by dependency? Explain different types of dependencies. Show remedy of each giving
examples. [4]
b. Explain loop splitting and self-scheduling mechanisms. Write down the criteria for selection from these
two mechanisms. Give examples. [4]
OR
Q-2 a. Differentiate between temporal and data parallelism. Explain any two methods of parallelism in detail.
[4]
b. What is ‘mutual exclusion’? Explain the necessary semaphore operations in Unix to solve the
contention problem. Give example. [4]
Q-3 a. Discuss the effect of number of process and number of iterations on the performance of parallel code.
[4]
b. Specify the dependency in a loop containing a single statement X(i) = X(i-1) + Y(i). How can it be
removed? Write an algorithm to parallelize this loop for n=20 and nproc =5. [4]
OR
Q-3 Obtain a task graph for calculating values of A,B,C from the following expressions: [8]
A = sin(x2y) + cos(xy2) + exp(x2)
B = g(p) + exp (-x*f(y)) + h(x2) + f(y)g(p)
C = f(x2) + sin(g(p)) + cos2 (h(y2))
Assuming that 3 processors are available, obtain a task assignment to processors assuming the given
timings for various operations.
Also compare the time obtained by your assignment with the ideal time needed to complete a job with 3
processors.
Timings for Multiply, sin, cos, exp: 2 units
g(x), f(x), h(x) : 3 units
Remaining operations : 1 unit
Section II
Q-4 a. What is the function of parallelising compiler? Differentiate between implicit and explicit parallelism.
[3]
b. What is condition variable? Write the advantages of using it. Give example using pthread library.
[3]
c. Define ‘parallel processing’. Why should one use it? Name few applications where it should be used. [3]
Q-5 a. Describe SIMD computer organization and its characteristics in detail. [4]
b. Discuss about the functionality to be provided for group communication in message passing
programming model. [4]
OR
Q-5 a. Draw a block diagram of distributed memory model of parallel computer. Write its advantages over shared memory model. [4]
b. What do you mean by vector processor? Where should it be useful? Explain possible vector
instructions in brief. [4]
Q-6 a. What is pipeline architecture? Draw the architecture. Write about different possible classifications of pipeline processors. [4]
b. Write about the ‘Support from OS in multiprocessing’. [4]
OR
Q-6 Write differences: [8]
a. PVM vs. MPI
b. Fork vs. pvm_spawn
c. FORALL statement vs. FORALL construct in HPF Fortran
d. Process vs. thread