Lab Manual - LP V - LA 3
Lab Manual - LP V - LA 3
LAB MANUAL
Distributed System
Lab Practice - V
Class:-BE Course:-2019
P.E.S’s Modern College of Engineering, Pune-05.
Department of Information Technology
Lab Manual
Subject Code & Name: 414454 LP - V (2019 Pat)
Class: BE
Semester: II
Compiled by:
Mrs. Sampada A. Kulkarni
Ms. Shoma S. Mitkari
VISION AND MISSION OF THE INSTITUTE
Vision Statement:
To create a collaborative academic environment to foster professional excellence and ethical
values
Mission Statement:
1. To develop outstanding professionals with high ethical standards capable of creating and
managing global enterprises
2. To foster innovation and research by providing a stimulating learning environment
3. To ensure equitable development of students of all ability levels and backgrounds
4. To be responsive to changes in technology, socio-economic and environmental conditions
5. To foster and maintain mutually beneficial partnerships with alumni and industry
Vision Statement:
To develop proficient IT engineers for the benefit of Industry and Society.
Mission Statement:
1. To achieve academic excellence.
Course Objectives
● The course aims to provide an understanding of the principles on which the distributed systems
are based, their architecture, algorithms and how they meet the demands of Distributed
applications.
● The course covers the building blocks for a study related to the design and the implementation
of distributed systems and applications.
Course Outcomes
Sr. Page
Title
No. No.
Implement multi-threaded client/server Process communication
1.
using RMI.
Develop any distributed application using CORBA to
2. demonstrate object brokering.
(Calculator or String operations).
Develop a distributed system, to find sum of N elements in an
array by distributing N/n elements to n number of processors
3.
MPI or OpenMP. Demonstrate by displaying the intermediate
sums calculated at different processors.
4. Implement Berkeley algorithm for clock synchronization.
5. Implement token ring based mutual exclusion algorithm.
6. Implement Bully and Ring algorithm for leader election.
Create a simple web service and write any distributed
7.
application to consume the web service.
Mini Project (In group): A Distributed Application for
8.
Interactive Multiplayer Games
Assignment No: 3
Title / Objective: MPI
Problem Statement: Develop a distributed system, to find sum of N elements in an array by distributing
N/n elements to n number of processors MPI or OpenMP. Demonstrate by displaying the intermediate
sums calculated at different processors.
Course Outcome:
A. For Prerequisites –
B. For Assignment -
Requirements: openmpi-4.1.4.tar.bz2.
Theory:
OpenMP:
OpenMP is an Application Program Interface (API) that may be used to explicitly direct multi-threaded,
shared memory parallelism in C/C++ programs. It allows developers to easily write shared-memory
parallel applications. A shared memory model runs on a single system and utilizes its multiple
processing units or cores to achieve concurrent computation using the same memory space. OpenMP
provides high-level compiler directives.
It is not intrusive on the original serial code in that the OpenMP instructions are made in pragmas
interpreted by the compiler.
OpenMP uses the fork-join model of parallel execution. All OpenMP programs begin with a single
master thread which executes sequentially until a parallel region is encountered, when it creates a team
of parallel threads (FORK). When the team threads complete the parallel region, they synchronize and
terminate, leaving only the master thread that executes sequentially (JOIN).
This includes #prgma omp parallel, used to identify which parts of the code need to run
concurrently #pragma omp critical to identify critical sections. It then automatically deals with many of
the low-level complications like handling threads (each core's line of execution) and locks (constructs
used to avoid problems like race and deadlock). It even handles reductions and compiles the results of
each thread into a final answer.
Inference:
A distributed system is developed, to find sum of N elements in an array by distributing N/n elements
to n number of processors MPI or OpenMP.
Oral questions:
1. What is MPI?
2. What is OpenMP?
3. What is difference between OpenMP and OpenMPI?
4. How can OpenMP threads permanently allocate memory on GPUs?
5. Is OpenMP multiprocessing or multithreading?
6. Is OpenMP parallel or concurrent?
7. How many threads can OpenMP use?
8. What are the different types of synchronization in OpenMP?
9. Does OpenMP use multiple cores?
10. What is the advantage of OpenMP?
11. How many cores does OpenMP use?
12. What is default in OpenMP?
13. What is the limit of threads?
14. How many threads can be active?
15. Can OpenMP be used more than one node?
16. Is OpenMP a compiler?
17. Which compiler supports OpenMP?
18. Is OpenMP shared memory or distributed memory?
19. How many processors does OpenMP have?
20. What is thread in OpenMP?
21. What is master thread in OpenMP?
22. What are the disadvantages of OpenMP?
23. What is the difference between thread and process in OpenMP?
24. What are the primary components of OpenMP?