Monday, December 20, 2010

Parallel Processing 2003


Gujarat University

MCA Semester IV
Parallel Processing


Date: 21st   July, 2003                                                                                                                        Marks:50


Section I


Q-1      Answer the following in brief:                                               
            a. Define true speedup giving necessary details.                                                                                1
            b. Explain the term ‘random scheduling’. Show its effect in parallel program with example.           2
`           c. Write the parallel code segments that parallelize single loop using self scheduling mechanism.    2
            d. Show the functions to remove semaphore and shared memory-using C under UNIX.                 2
            e. Differentiate between process and thread.                                                                                     2

Q-2      a. Differentiate the dependency in the following loop. Show at least two possible solutions to resolve
    it. For each solution, write the advantages and drawbacks.                                                           4
            Loop: for (i=0; i<n; i++) x[i] = x[i + 1] + y[i];
b. Discuss about the effect of creating processes at load time and at runtime.                                  4

OR

Q-2      a. How can indirect scheduling be used to transform two nested loops into a single one? Can it be used
   when there is dependency among loop iterations? Justify your answer. Write sequential code  
   segment that finds sum of all elements of a matrix with m rows and n columns. Parallelize this code  
   segment.
b. Discuss about an effect of number processes on speedup in parallel computing.                          4

Q-3      a. What do you mean by data parallelism? Explain static and quasi-dynamic scheduling methods of
    data parallelism. Derive speed up for any one method. Write the assumptions, if any.                 4
b. Explain creating and joining of threads under POSIX implementation. Give examples.              4

OR

Q-3      a. Obtain a task graph using the following sequential code segments. Consider each statement as a  
                task.                                                                                                                                                 4          R5 = R1 + R2;
                        R6 = R3 * R4;
                        R7 = R6 – R2;
                        R5 = R3 + 1;
                        R4 = R7 * 2;
                        R7 = R4 / R5; 
                        R8 = R2-R3;
                  Assuming that all operations take same time, assign these tasks to three processors to work in   
      parallel. Using this, find the time to finish all tasks.
            b. Explain about ‘expression splitting’ parallel technique. Give example.                                          4

Section II

Q-4      a. Write the functionality of MPI_Init, MPI_Comm_size and MPI_Comm_rank.                           3
            b. Explain the use of BLOCK and CYCLIC in distributive directive in HPF.                                 3
            c. Draw PVM architecture. Write the role of pvmd.                                                                          3

Q-5      a. Describe Flynn’s classification. Give characteristics And application for each. Show the architecture  
                of an one.                                                                                                                                        4
            b. Discuss about the desired features of multiprocessor OS.                                                             4
OR
Q-5      a. What do you mean by inter-connection networks? Describe crossbar switch and time shared bus
     architectures.                                                                                                                                  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. Discuss about the views of any two pessimists who discourages parallel machines involving large 
    number of processors.                                                                                                                     4
OR
Q-6      Write differences:                                                                                                                               8
a.       Coarse grained vs. fine grained parallelism
b.      Shared memory vs. dynamic memory programming model
c.       FORALL statement vs. FORALL construct in HPF fortran
d.      MPI vs PVM systems