| SR.NO |
NAME OF PRACTICAL |
| 01 |
Write a header file pp.h containing three user defined functions process_fork(), process_join() and sharei(). |
| 02 |
Write a parallel program to demonstrate use of process_fork() and process_join() functions. |
| 03 |
Write a parallel program to create one child process and to print message to tell weather it is parent process or child process. Also print the ID of process. Discuss the possible outputs. |
| 04 |
Write a parallel program to demonstrate that each process has it's own copy of variable. |
| 05 |
Write a parallel program to demonstrate that each process has a common copy of shared variable. |
| 06 |
Write a parallel program to sum all the elements of an integer array of size 10. Create 2 processes for this. Parent will calculate sum of all the odd indexed elements andchild will do the sum of all the even indexed elements. After the child process is destroyed parent will calculate the final sum.
Write a parallel program to sum all the elements of an integer array of size 20.Use total 4 processes for this. Use efficient Loop Splitting. |
| 08 |
Write a parallel program to copy all the elements of an integer array of size 20 into another array. Use total 4 processes for this. Use efficient Loop Splitting.
|
| 09 |
Write a parallel program to find maximum from an integer array of size 20. Use total 4 processes for this. Use efficient Loop Splitting.
|
| 10 |
Write a parallel program to multiply two arrays. The size of first array is 10 by 10 while the size of second array is 10. Use total 5 processes for this. Use efficient Loop Splitting. |
| 11 |
Write following user defined functions in a header file pp.h. init_lock(), spin_lock(), spin_unlock(), init_barrier() and barrier() |
| 12 |
Write a parallel program to sum all the elements of an integer array of size 20.Use total 4 processes for this. Use Self Scheduling. |
| 13 |
Write a parallel program to copy all the elements of an integer array of size 20 into another array. Use total 4 processes for this. Use efficient Self Scheduling. |
| 14 |
Write a parallel program to multiply two arrays. The size of first array is 10 by 10 while the size of second array is 10. Use total 5 processes for this. Use Self Scheduling. |
| 15 |
Write a parallel program to increment all the elements of an integer array of size 10.Use Self Scheduling |
| 17 |
Write a parallel program to create histogram for an array of 100 integers using Self Scheduling. The program should be such that each element of the histogram array should be protected with different lock. |
| 18 |
Write a parallel program to create histogram for an array of 100 integers. Your program should be such that each process must maintain a private histogram which is a histogram of a subset of array elements. |
| 19 |
Write a parallel program to increment all the elements of an integer array of size 10.Use Loop Splitting. |
| 20 |
Write a parallel program to print first n prime numbers. Use Self Scheduling. |
| 21 |
Write a parallel program to get average and absolute deviation of array a(i) with the use of barrier. |
| 22 |
Consider the following data: A program has seven arrays a,b,,c,d,e,f and x of 10 integers and expression isx[0] = a[0] + b[0] +c[0] + d[0] +e[0] + f[0]
x[1] = a[1] + b[1] +c[1] + d[1] +e[1] + f[1]
..
..
x[9] = a[9] + b[9] +c[9] + d[9] +e[9] + f[9]
write a parallel C program which does this using expression splitting.
(a) using single barrier (b) using multiple barriers (c) without using barrier(use spin lock) |
| 23 |
Write a parallel program to implement the following code
do7k=1,n
x(k) = u(k) +r*(z(k)+r*y(k)) + t*(u(k+3)+r*(u(k+2)+r*u(k+1)))
+ t*t*(u(k+6)+r*(u(k+5)+r*u(k+4)))
7 continue
What is this method called? |