CS3551 DC - Unit - I Qbank Final
CS3551 DC - Unit - I Qbank Final
CS3551 DC - Unit - I Qbank Final
COLLEGE
OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
R2021 – SEMESTER – V
UNIT – I : INTRODUCTION
Question Bank
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 1
SYLLABUS
CS3551 DISTRIBUTED COMPUTING LTPC
3003
COURSE OBJECTIVES:
To introduce the computation and communication models of distributed systems
UNIT IINTRODUCTION 8
TOTAL TOPICS: 11
COURSE OUTCOMES:
Upon the completion of this course, the student will be able to
Course Outcomes (COs)
TEXT BOOKS
1) Kshemkalyani Ajay D, Mukesh Singhal, “Distributed Computing: Principles, Algorithms and
Systems”, Cambridge Press, 2011.
2) Mukesh Singhal, Niranjan G Shivaratri, “Advanced Concepts in Operating systems”, Mc- Graw
Hill Publishers, 1994.
REFERENCES
1) George Coulouris, Jean Dollimore, Time Kindberg, “Distributed Systems Concepts and Design”,
Fifth Edition, Pearson Education, 2012.
2) Pradeep L Sinha, “Distributed Operating Systems: Concepts and Design”, Prentice Hall of India,
2007.
3) Tanenbaum A S, Van Steen M, “Distributed Systems: Principles and Paradigms”, Pearson
Education, 2007.
4) Liu M L, “Distributed Computing: Principles and Applications”, Pearson Education, 2004.
5) Nancy A Lynch, “Distributed Algorithms”, Morgan Kaufman Publishers, 2003.
6) Arshdeep Bagga, Vijay Madisetti, “ Cloud Computing: A Hands-On Approach”, Universities
Press, 2014.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 2
CO’s-PO’s & PSO’s MAPPING
CO’s PO’s PSO’s
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3
1 2 2 3 3 1 - - - 2 1 3 3 2 1 1
2 1 3 2 1 2 - - - 2 2 2 2 1 3 2
3 2 2 1 3 3 - - - 3 2 1 1 1 2 1
4 1 2 2 3 1 - - - 3 3 2 1 3 1 1
5 3 3 1 2 3 - - - 3 3 3 1 3 2 3
AVg. 1.8 2.4 1.8 2.4 2 - - - 2.6 2.2 2.2 1.6 2 1.8 1.6
1 - low, 2 - medium, 3 - high, ‘-“- no correlation
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 3
BTL6 Creating Adapt, Build, Change, Choose, Compile information together
Combine, Compile, Compose, in a different way by
Construct, Create, Design, Develop, combining elements in a new
Discuss, Elaborate, Estimate, pattern or proposing
Formulate, Improve, Invent, alternative solutions.
Maximize, Minimize, Modify,
Originate, Plan, Predict, Propose,
Solve, Suppose, Test
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 4
UNIT I
INTRODUCTION
Introduction: Definition-Relation to Computer System Components – Motivation – Message
- Passing Systems versus Shared Memory Systems – Primitives for Distributed
Communication – Synchronous versus Asynchronous Executions – Design Issues and
Challenges; A Model of Distributed Computations: A Distributed Program – A Model of
Distributed Executions – Models of Communication Networks – Global State of a
Distributed System.
PART A
Blooms
S.
No. Question CO Taxonomy
Level
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 5
3 What is the significance of distributed system?
a) Concurrency of computers. CO1
b) No global clock. BTL-1
c) Independent failures
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 6
6 List the Key components of Distributed Computing System.
a) Client Server System can be applied with multiple servers. CO1 BTL-1
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 7
10 What are the Disadvantages of Distributed Systems?
MAY/JUNE 2016, NOV/DEC 2016
1.Difficulties of developing distributed software
2.Networking problems
3.Security problems
Software
Little software exists compared to PCs (for example) but the CO1
situation is improving with the cloud. BTL-1
Networking
Still slow and can cause other problems (e.g., when
disconnected)
Security
Data may be accessed by unauthorized users through
network interfaces
Privacy
Data may be accessed securely but without the
owner’s consent (significant issue in
modern systems)
11 What are the Applications of Distributedsystems?
Email
News
Multimedia information systems - video conferencing
Airline reservation system CO1 BTL-1
Banking system
File downloads (BitTorrent)
Messaging
Asynchronous Execution
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 9
which means operations or only one operation or
programs can run in program will run at a time.
parallel.
Async is non-blocking, Sync is blocking — it will
which means it will send only send the server one
multiple requests to a request at a time and will
server. wait for that request to be
answered by the server.
Async increases throughput Sync is slower and more
because multiple operations methodical.
can run at the same time.
i) Economics CO1
ii) Speed BTL-1
iii) Geographic and ResponsibilityDistribution
iv) Reliability
v) Extendibility
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
10
20 Write the Resource Sharing of Distributed system.
NOV/DEC 2017
1.Share hardware, 2.software, 3.data and information
Hardware Devices CO1
Printers, disks, memory, sensors BTL-1
Software Sharing
Compilers, libraries, toolkits, computational Kernels
Data
Databases, files
21 Define Distributed Program.
Definition: Distributed Program
•A distributed program is composed of a set of asynchronous
CO1
processes that communicate by message passing over the BTL-1
communication network.
•A distributed program consists of a collection of processes that
work concurrently and communicate by explicit message
passing.
•Each process can access a set of variables which are disjoint
from the variables that can be changed by any other process.
•A computer program that runs within a distributed system is
called a distributed program, and distributed programming is the
process of writing such programs.
22 What are the Design issues of Distributed system?
Openness
Resource Sharing
Concurrency CO1
Scalability BTL-1
Fault-Tolerance
Transparency
High-Performance
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
11
23 Write the issues arising from Distributed Systems
Naming - How to uniquely identify resources.
Communication - How to exchange data and information
reliably with good performance.
Software Structure - How to make software open, extensible,
scalable, with high-performance.
Workload Allocation - Where to perform computations and CO1 BTL-1
various services.
Consistency Maintenance - How to Keep consistency at a
reasonable cost.
24 List the challenges in distributed system.
1. Heterogeneity
2. Openness CO1
BTL-1
3. Security
4. Scalability
5. Failure handling
6. Concurrency
Transparency
25 How distributed processes are executed in distributed Computing
Environment?
Distributed Process execution
•The execution of a process consists of a sequential execution of CO1
its actions. BTL-1
•The actions are atomic and the actions of a process are modeled
as three types of events:
i) Internal events,
ii) Message send events, and
iii) Message receive events.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
13
32 Define heterogeneity.
The Internet enables users to access services and run
applications over a heterogeneous collection of computers and
networks.
Heterogeneity (that is, variety and difference) applies to all
of the following: CO1
• Networks; BTL-1
• Computer hardware;
• Operating systems;
• Programming languages;
• Implementations by different developers.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
14
PART B
1 i) List and describe the components of a Distributed System. CO1 BTL-1 &
(7) BTL-2
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
15
PART – C
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
16
PART – B( 13 Marks) - ANSWER KEY
a) Devices or Systems:
The devices or systems in a distributed system have their own processing capabilities
and may also store and manage their own data.
b) Network:
The network connects the devices or systems in the distributed system, allowing them to
communicate and exchange data.
c) Resource Management:
Distributed systems often have some type of resource management system in place to
allocate and manage shared resources such as computing power, storage, and
networking.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 17
The architecture of a Distributed Computing System is typically a Peer-to-Peer Architecture, where
devices or systems can act as both clients and servers and communicate directly with each other.
The three basic components of a distributed system include
a) primary system controller,
b) system data store, and
c) database.
The primary system controller is the only controller in a distributed system and keeps track of
everything.
It’s also responsible for controlling the dispatch and management of server requests throughout the
system.
The executive and mailbox services are installed automatically on the primary system controller.
In a non-clustered environment, optional components consist of a user interface and secondary
controllers.
a) Secondary controller
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 18
The secondary controller is a process controller or a communications controller.
It’s responsible for regulating the flow of server processing requests and managing the system’s
translation load.
It also governs communication between the system and VANs or trading partners.
b) User-interface client
The user interface client is an additional element in the system that provides users with important
system information.
This is not a part of the clustered environment, and it does not operate on the same machines as
the controller.
It provides functions that are necessary to monitor and control the system.
Each system has only one data store for all shared data.
The data store is usually on the disk vault, whether clustered or not.
For non-clustered systems, this can be on one machine or distributed across several devices, but
all of these computers must have access to this datastore.
3. Database
In a distributed system, a relational database stores all data. Once the data store locates the data, it
shares it among multiple users.
Relational databases can be found in all data systems and allow multiple users to use the same
information simultaneously.
***********************
ii) Illustrate with necessary diagram how distributed components are loosely coupled. (6)
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 19
ANSWER KEY:
The loosely coupled system contains distributed memory. On the other hand, a tightly coupled system
has a shared memory.
The loosely coupled system contains a low data rate. On the other hand, the tightly coupled system
contains a high data rate.
These are the systems in which data is stored and processed on many machines which are
connected by some network.
To make it more simple, distributed systems are a collection of several separate(individual) systems
which communicate (through a LAN or WAN) and cooperate with each other (using some
software) in order to provide the users, access to various resources that the system maintains.
One important point to note about distributed systems is that they are loosely-coupled i.e;
hardware and software may communicate with each other but they need not depend upon each
other.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 20
Thus the loosely-coupled components in Distributed System provides major support for
performance.
a) Cloud Computing: Cloud Computing systems are a type of distributed computing system that are
used to deliver resources such as computing power, storage, and networking over the Internet.
b) Peer-to-Peer Networks: Peer-to-Peer Networks are a type of distributed computing system that is
used to share resources such as files and computing power among users.
c) Distributed Architectures: Many modern computing systems, such as microservices architectures,
use distributed architectures to distribute processing and data storage across multiple devices or
systems.
A distributed computation consists of a set of processes that cooperate to achieve a common goal.
A main characteristic of these computations is that the processes do not already share a common
global memory and that they communicate only by exchanging messages over a communication
network.
*****************************
2) Define distributed systems. What are the significant issues and challenges of the distributed
systems? NOV/DEC 2017, APRIL/MAY 2018
ANSWER KEY
Designing a distributed system does not come as easy and straight forward.
A number of challenges need to be overcome in order to get the ideal system.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 21
1. Heterogeneity:
The Internet enables users to access services and run applications over a heterogeneous collection
of computers and networks.
Heterogeneity (that is, variety and difference) applies to all of the following:
i) Hardware devices: computers, tablets, mobile phones, embedded devices, etc.
ii) Operating System: Ms Windows, Linux, Mac, Unix, etc.
iii) Network: Local network, the Internet, wireless network, satellite links, etc.
iv) Programming languages: Java, C/C++, Python, PHP, etc.
v) Different roles of software developers, designers, system managers
Different programming languages use different representations for characters and data structures
such as arrays and records.
These differences must be addressed if programs written in different languages are to be able to
communicate with one another.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 22
Programs written by different developers cannot communicate with one another unless they use
common standards, for example, for network communication and the representation of primitive
data items and data structures in messages.
For this to happen, standards need to be agreed and adopted – as have the Internet protocols.
Middleware :
The term middleware applies to a software layer that provides a programming abstraction as
well as masking the heterogeneity of the underlying networks, hardware, operating
systems and programming languages.
Most middleware is implemented over the Internet protocols, which themselves mask the
differences of the underlying networks, but all middleware deals with the differences in
operating systems and hardware .
The term mobile code is used to refer to program code that can be transferred from one computer to
another and run at the destination – Java applets are an example. Code suitable for running on one
computer is not necessarily suitable for running on another because executable programs are normally
specific both to the instruction set and to the host operating system.
2.Transparency:
Transparency is defined as the concealment from the user and the application programmer of the
separation of components in a distributed system, so that the system is perceived as a whole rather than as
a collection of independent components.
In other words, distributed systems designers must hide the complexity of the systems as much as they
can.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 23
Migration: Hide that a resource may move to another location
Relocation: Hide that a resource may be moved to another location while in use Replication
Hide that a resource may be copied in several places
Concurrency: Hide that a resource may be shared by several competitive users Failure Hide
the failure and recovery of a resource
Persistence: Hide whether a (software) resource is in memory or a disk
3. Openness
The openness of a computer system is the characteristic that determines whether the system can
be extended and re-implemented in various ways.
The openness of distributed systems is determined primarily by the degree to which new
resource-sharing services can be added and be made available for use by a variety of client
programs.
If the well-defined interfaces for a system are published, it is easier for developers to add new
features or replace sub-systems in the future.
Example: Twitter and Facebook have API that allows developers to develop theirs own software
interactively.
4. Concurrency
Both services and applications provide resources that can be shared by clients in a distributed
system. There is therefore a possibility that several clients will attempt to access a shared resource
at the same time.
For example, a data structure that records bids for an auction may be accessed very frequently
when it gets close to the deadline time.
For an object to be safe in a concurrent environment, its operations must be synchronized in such
a way that its data remains consistent.
This can be achieved by standard techniques such as semaphores, which are used in most
operating systems.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 24
5. Security
Many of the information resources that are made available and maintained in distributed systems
have a high intrinsic value to their users.
Their security is therefore of considerable importance.
availability for the authorized (protection against interference with the means to access the resources).
6. Scalability
i) Size
Number of users and resources to be processed. Problem associated is overloading
ii) Geography
Distance between users and resources. Problem associated is communication reliability
iii) Administration
As the size of distributed systems increases, many of the system needs to be controlled. Problem
associated is administrative mess
7. Failure Handling
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 25
When faults occur in hardware or software, programs may produce incorrect results or may stop
before they have completed the intended computation.
The handling of failures is particularly difficult.
**************************
4. Mobile & ubiquitous computing – Small and portable devices are possible to be used within
distributed systems
• E.g. laptop computers, handheld devices, wearable devices, devices embedded in appliances –
Mobile computing: portability of the devices and the ability to connect to networks in different
places –
Ubiquitous computing: small computing devices that available everywhere and are easily
attached to networks
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 26
5. Portable & handheld devices in a distributed system.
8. Cloud computing:
Cloud computing: distributed computing utility.
A cloud is a set of internet-based application, storage and computing services sufficient to
support most users’ needs.
Cloud are implemented on cluster computers to provide the appropriate scale and
performance required by such services
9) A cluster computer: a set of interconnected computers that cooperate closely to provide a single
integrated high-performance computing capability –
A blade server: a computer server that has been designed to minimize the use of physical
space and energy
10. Grid Computing – Is a form of cloud computing – Authorized users share processing power,
memory and data storage – Use to support scientific applications
*****************
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 27
ii) Enlighten ANY TWO examples of distributed systems. MAY/JUNE 2016 (4)
ANSWER KEY
a) Web search
Web search has emerged as a major growth industry in the last decade, with recent figures
indicating that the global number of searches has risen to over 10 billion per calendar month.
The task of a web search engine is to index the entire contents of the World Wide Web,
encompassing a wide range of information styles including web pages, multimedia sources and
(scanned) books.
This is a very complex task, as current estimates state that the Web consists of over 63 billion
pages and one trillion unique web.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 28
and Flickr;
the emergence ofsocial networking through services such as Facebook and MySpace.
e) Healthcare
The growth of health informatics as a discipline with its emphasis on online electronic patient
records and related issues of privacy;
the increasing role of telemedicine in supporting remote diagnosis or more advanced services
such as remote surgery (including collaborative working between healthcare teams);
the increasing application of networking and embedded systems technology in assisted living, for
example for monitoring the elderly in theirown homes.
f) Education
The emergence of e-learning through for example web-based tools such as virtual learning
environments;
associated support for distance learning; support for collaborative or community-based learning.
i) GPS in route finding systems and more general traffic management systems;
ii) the modern car itself as an example ofa complex distributed system (also applies to other forms of
transport such as aircraft);
iii) the development of web-based map services such as MapQuest, Google Maps and Google Earth.
*********************
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 29
4) Describe the need of Distributed System with following basis:
a) Requirements (5)
b) Major Characteristics (4)
c) Reasons (4)
ANSWER KEY:
The motivation for using a distributed system is some or all of the following
requirements:
In many applications such as money transfer in banking, or reaching consensus among parties that are
geographically distant, the computation is inherently distributed.
2) Resource sharing
The resources such as peripherals, complete data sets in databases, special libraries, as well as
data (variable/files) cannot be fully replicated at all the sites because it is often neither practical
nor cost-effective.
Further, they cannot be placed at a single site because access to that site might prove to be a
bottleneck.
Therefore, such resources are typically distributed across the system.
For example, distributed databases such as DB2 partition the data sets across several servers, in
addition to replicating them at a few sites for rapid access as well as reliability.
In many scenarios, the data cannot be replicated at every site participating in the
distributed execution because it may be too large or too sensitive to be replicated.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 30
For example, payroll data within a multinational corporation is both too large and too sensitive to
be replicated at every branch office/site.
It is therefore stored at a central server which can be queried by branch offices.
Similarly, special resources such as supercomputers exist only in certain locations, and to access
such supercomputers, users need to log in remotely.
Advances in the design of resource-constrained mobile devices as well as in the wireless
technology with which these devices communicate have given further impetus to the importance
of distributed protocols and middleware.
4. Enhanced reliability
A distributed system has the inherent potential to provide increased reliability because of the
possibility of replicating resources and executions, as well as the reality that geographically
distributed resources are not likely to crash/malfunction at the same time under normal
circumstances.
• integrity, i.e., the value/state of the resource should be correct, in the face of concurrent access from
multiple processors, as per the semantics expected by the application;
• fault-tolerance, i.e., the ability to recover from system failures, where such failures may be defined to
occur in one of many failure models
By resource sharing and accessing geographically remote data and resources, the
performance/cost ratio is increased.
Although higher throughput has not necessarily been the main objective behind using a
distributed system, nevertheless, any task can be partitioned across the various computers in the
distributed system.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 31
Such a configuration provides a better performance/cost ratio than using special parallel
machines.
This is particularly true of the NOW configuration.
6. Scalability
As the processors are usually connected by a wide-area network, adding more processors does not pose a
direct bottleneck for the communication network.
Heterogeneous processors may be easily added into the system without affecting the performance,
as long as those processors are running the same middleware algorithms.
Similarly, existing processors may be easily replaced by other processors.
A main characteristic of these computations is that the processes do not already share a common global
memory and that they communicate only by exchanging messages over a communication network.
i) Multiple Devices or Systems: Processing and data storage is distributed across multiple devices
or systems.
ii) Peer-to-Peer Architecture: Devices or systems in a distributed system can act as both clients and
servers, as they can both request and provide services to other devices or systems in the network.
iii) Shared Resources: Resources such as computing power, storage, and networking are shared
among the devices or systems in the network.
Horizontal Scaling: Scaling a distributed computing system typically involves adding more devices or
systems to the network to increase processing and storage capacity. This can be done through hardware
upgrades or by adding additional devices or systems to the network.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 32
Reasons for building a Distributed System
A distributed system contains multiple nodes that are physically separate but linked together using
the network.
All the nodes in this system communicate with each other and handle processes in tandem.
Each of these nodes contains a small part of the distributed operating system software.
a) It is inherently distributed :
For example, sending a message from your mobile phone to your friend’s phone.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 33
c) For better performance
Get data from nearby node rather than one halfway round the world.
For example, a huge amount of data will not be fit into a single machine.
a) Resource sharing
b) Computation speedup
c) Reliability
d) Communication.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 34
Generally, one host at one site, the server, has a resource that another host at another site, the
client (or user), would like to use. A general structure of a distributed system is shown in Figure
**************************
5) i) What are Message Passing System(MPS) and Shared Memory System (SMS)?
(8)
ANSWER KEY:
If a set of processes communicate with one another by sending and receiving messages over a
communication channel is called message-passing systems.
Message passing in distributed systems involves communication between nodes to coordinate
actions, exchange data, and propagate information.
The pattern of the connection provided by the channel is described by some topology systems.
The collection of the channels is called a network.
This allows multiple processes to read and write data to the message queue without being
connected to each other
Messages are stored on the queue until their recipient retrieves them.
Message queues are quite useful for inter process communication and are used by most operating
systems.
In this model, data is shared by sending and receiving messages between co-operating processes,
using system calls .
Message Passing is particularly useful in a distributed environment where the communicating
processes may reside on different, network connected, systems.
Message passing architectures are usually easier to implement but are also usually slower than
shared memory architectures.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 36
Message-Passing Communication: for data transfer
Tasks exchange data through communications by sending and receiving explicit messages.
Data transfer usually requires cooperative operations to be performed by each process.
For example, a send operation must have a matching receive operation.
Message passing is a flexible and scalable method for inter-node communication in distributed
systems.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 37
It enables nodes to exchange information, coordinate activities, and share data without relying on
shared memory or direct method invocations.
Models like synchronous and asynchronous message passing offer different synchronization and
communication semantics to suit system requirements.
Synchronous message passing ensures sender and receiver synchronization, while asynchronous
message passing allows concurrent execution and non-blocking communication.
ii) Compare Message Passing System (MPS) and Shared Memory System (SMS). (5)
ANSWER KEY:
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 38
All remote data accesses are explicit and not involve communication by the
therefore the programmer is always aware underlying runtime support.
of whether a particular operation is in-
process or involves the expense of
communication.
***************
ANSWER KEY:
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 39
While the RECEIVE primitive receives a message from a specified source process.
For the Receive primitive, the buffered option is usually required because the data may already
have arrived when the primitive is invoked, and needs a storage place in the kernel.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 40
The processing for the Receive primitive completes when the data to be received is copied into the
receiver’s user buffer.
b) Asynchronous primitives
A Send primitive is said to be asynchronous if control returns back to the invoking process after
the data item to be sent has been copied out of the user-specified buffer.
It does not make sense to define asynchronous Receive primitives.
c) Blocking primitives
A primitive is blocking if control returns to the invoking process after the processing for the primitive
(whether in synchronous or asynchronous mode) completes.
d) Non-blocking primitives
A primitive is non-blocking if control returns back to the invoking process immediately after
invocation, even though the operation has not completed.
For a non-blocking Send, control returns to the process even before the data is copied out of the
user buffer.
For a non-blocking Receive, control returns to the process even before the data may have arrived
from the sender.
For non-blocking primitives, a return parameter on the primitive call returns a system-generated
handle which can be later used to check the status of completion of the call. The process can
check for the completion of the call in two ways.
First, it can keep checking (in a loop or periodically) if the handle has been flagged or posted.
Second, it can issue a Wait with a list of handles as parameters.
The Wait call usually blocks until one of the parameter handles is posted.
Presumably after issuing the primitive in non-blocking mode, the process has done whatever
actions it could and now needs to know the status of completion of the call, therefore using a
blocking Wait() call is usual programming practice.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 41
The code for a non-blocking Send would look as shown in Figure 1.7.
If at the time that Wait() is issued, the processing for the primitive (whether synchronous or
asynchronous) has completed, the Wait returns immediately.
The completion of the processing of the primitive is detectable by checking the value of handle_k.
If the processing of the primitive has not completed, the Wait blocks and waits for a signal to
wake it up.
When the processing for the primitive completes, the communication subsystem software sets the
value of handle_k and wakes up (signals) any process with a Wait call blocked on this handle_k.
This is called posting the completion of the operation.
*******************
ii) Describe briefly on Send and its and types and Receive primitives and its types. (7)
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 42
ANSWER KEY:
While the RECEIVE primitive receives a message from a specified source process.
1) synchronous blocking,
2) synchronous non-blocking,
3) asynchronous blocking, and
4) asynchronous non-blocking
For the Receive primitive, there are the blocking synchronous and non-blocking synchronous versions.
These versions of the primitives are illustrated in Figure 1.8 using a timing diagram.
Here, three time lines are shown for each process:
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 43
(1) for the process execution,
(2) for the user buffer from/to which data is sent/received, and
(3) for the kernel/communication subsystem.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 44
Control returns to the user process as soon as this transfer is initiated, and a parameter in the non-
blocking call also gets set with the handle of a location that the user process can check later using
the Wait operation for the completion of the asynchronous Send operation.
The asynchronous Send completes when the data has been copied out of the user’s buffer.
The checking for the completion may be necessary if the user wants to reuse the buffer from which
the data was sent.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 45
PART – C (1 X 15 Marks) – ANSWER KEY
1) i) List and describe ANY SIX major design issues of Distributed System. (6)
ANSWER KEY:
DESIGN ISSUES
Primary issues in the design of the distributed systems included providing access to remote data in the
face of failures, file system design, and directory structure design.
Below we describe the important design issues and challenges after categorizing them as
(i) having a greater component related to systems design and operating systems design, or
(ii) having a greater component related to algorithm design, or
(iii) emerging from recent technology advances and/or driven by new applications.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 46
There is some overlap between these categories.
However, it is useful to identify these categories because of the deep differences among the:
(i) The systems community,
(ii) The theoretical algorithms community within distributed computing, and
(iii) The forces driving the emerging applications and technology.
For example, the current practice of distributed computing follows the client–server architecture
to a large degree, whereas that receives scant attention in the theoretical distributed algorithms
community.
First,
an overwhelming number of applications outside the scientific computing community of users of
distributed systems are business applications for which simple models are adequate.
Second,
the state of the practice is largely controlled by industry standards, which do not necessarily
choose the “technically best” solution.
The fundamental issue in design and implementation of DSM system is data irregularity.
The data irregularity might be raised by the synchronous access.
To solve this problem in the DSM system we need to utilize some synchronization primitives,
semaphores, event count, and so on.
Performance is an important issue and challenge of Distributed Software System.
To minimize the constraints, and thus challenges, problems are to be discussed and solutions are to be
provided.
In distributed software system different task scheduling algorithms are developed.
These algorithms should be evaluated on different available task evaluation parameters for a specific
task graph which ultimately should represent the DSS.
The best algorithm performance result should ultimately be adopted.
This approach will minimize the challenges of DSS.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 47
Major design issues of distributed systems
The following are some of the major design issues of distributed systems:
Here are a number of design considerations to take into account.
i) Heterogeneity:
Heterogeneity is applied to the network, computer hardware, operating system, and
implementation of different developers.
A key component of the heterogeneous distributed system client-server environment is
middleware.
Middleware is a set of services that enables applications and end-user to interact with each
other across a heterogeneous distributed system.
ii) Openness:
The openness of the distributed system is determined primarily by the degree to which new
resource-sharing services can be made available to the users.
Open systems are characterized by the fact that their key interfaces are published.
It is based on a uniform communication mechanism and published interface for access to shared
resources.
It can be constructed from heterogeneous hardware and software.
iii) Scalability:
The scalability of the system should remain efficient even with a significant increase in the
number of users and resources connected.
It shouldn’t matter if a program has 10 or 100 nodes; performance shouldn’t vary.
A distributed system’s scaling requires consideration of a number of elements, including size,
geography, and management.
iv) Security:
The security of an information system has three components Confidentially, integrity, and
availability.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 48
Encryption protects shared resources and keeps sensitive information secrets when
transmitted.
v) Failure Handling:
When some faults occur in hardware and the software program, it may produce incorrect
results or they may stop before they have completed the intended computation so corrective
measures should to implemented to handle this case.
Failure handling is difficult in distributed systems because the failure is partial i, e, some
components fail while others continue to function.
vi) Concurrency:
There is a possibility that several clients will attempt to access a shared resource at the same
time. Multiple users make requests on the same resources, i.e. read, write, and update.
Each resource must be safe in a concurrent environment. Any object that represents a shared
resource in a distributed system must ensure that it operates correctly in a concurrent
environment.
vii) Transparency:
Transparency ensures that the distributed system should be perceived as a single entity by the
users or the application programmers rather than a collection of autonomous systems, which is
cooperating.
The user should be unaware of where the services are located and the transfer from a local
machine to a remote one should be transparent.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 49
Synchronization is another important aspect in DSS because Distributed System do not have a
global clock.
It is required that synchronization be done as per the actual real time.
*************
ANSWER KEY:
7 ii) CHALLENGES
The Distribution System start addresses the challenges in designing distributed systems from a
system building perspective.
a) Security,
b) Maintaining consistency of data in every system,
c) Network Latency between systems,
d) Resource Allocation, or
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 50
e) Proper node balancing across multiple nodes
ii) Processes
Some of the issues involved are:
i) management of processes and threads at clients/servers; code migration; and
ii) the design of software and mobile agents.
iii) Naming
Devising easy to use and robust schemes for names, identifiers, and addresses is essential for locating
resources and processes in a transparent and scalable manner.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 51
Naming in mobile systems provides additional challenges because naming cannot easily be tied to
any static geographical topology.
iv) Synchronization
Mechanisms for synchronization or coordination among the processes are essential.
Mutual exclusion is the classical example of synchronization, but many other forms of
synchronization, such as leader election are also needed.
In addition, synchronizing physical clocks, and devising logical clocks that capture the essence of
the passage of time, as well as global state recording algorithms, all require different forms of
synchronization.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 52
viii) Security
Distributed systems security involves various aspects of cryptography, secure channels, access
control, key management – generation and distribution, authorization, and secure group
management.
ix) Applications Programming Interface (API) and transparency
The API for communication and other specialized services is important for the ease of use and
wider adoption of the distributed systems services by non-technical users.
ii) Location transparency : makes the locations of resources transparent to the users.
iv) Replication transparency: does not let the user become aware of any replication.
v) Concurrency transparency: deals with masking the concurrent use of shared resources for the user.
vi) Failure transparency: refers to the system being reliable and fault-tolerant.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 53
Algorithmic challenges in distributed computing
The summarization of the key algorithmic challenges in distributed computing are:
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 54
(i) capture the logic and inter-process dependencies within the distributed program,
(ii) track the relative progress at each process.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 55
vi) Distributed program design and verification tools
Methodically designed and verifiably correct programs can greatly reduce the overhead of
software design, debugging, and engineering.
Designing mechanisms to achieve these design and verification goals is a challenge.
vii) Performance
Although high throughput is not the primary goal of using a distributed system, achieving good
performance is important. In large distributed systems, network latency (propagation and
transmission times) and access to shared resources can lead to large delays which must be
minimized.
The user perceived turn-around time is very important.
The following are some example issues arise in determining the performance:
• Metrics
Appropriate metrics must be defined or identified for measuring the performance of theoretical
distributed algorithms, as well as for implementations of such algorithms.
The former would involve various complexity measures on the metrics, whereas the latter would
involve various system and statistical metrics.
• Measurement methods/tools
As a real distributed system is a complex entity and has to deal with all the difficulties that arise
in measuring performance over a WAN/the Internet, appropriate methodologies and tools must be
developed for measuring the performance metrics.
*******************
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 56
2) Describe in details on model of Distributed Computing. (15)
ANSWER KEY:
The actions are atomic and the actions of a process are modeled as three types of events:
i) internal events,
The execution of process pi produces a sequence of events e1, e2, e3, …, and it is denoted by
msg indicates the dependency that exists due to message passing between two events.
Let ex i denote the xth event at process pi .
For a message m, let send(m) and rec(m) denote its send and receive events, respectively.
The events at a process are linearly ordered by their order of occurrence.
The execution of process pi produces a sequence of events
e1i , e2i , ..., and is denoted by Hi where
Hi = (hi , →i )
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 57
hi is the set of events produced by pi and
Occurrence of events
The occurrence of events changes the states of respective processes and channels.
The occurrence of events changes the states of respective processes and channels, thus
causing transitions in the global system state.
A send event changes the state of the process that sends the message and the state of the
channel on which the message is sent.
A receive event changes the state of the process that receives the message and the state of the
channel on which the message is received.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 58
Message distribution ordering
This term was coined by Lamport. Happens-before defines a partial order of events in a
distributed system.
Some events can’t be placed in the order. If say A →B if A happens before B. A→B is defined
using the following rules:
Local ordering:A and B occur on same process and A occurs before B.
a→b, if a and b are events in the same process and a occurred before b.
a→b, if a is the event of sending a message m in a process and b is the event of the same message
m being received by another process.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 59
If a→b and b→c, then a→c. Lamports law follow transitivity property.
Consider two events c and d; c→d and d→c is false (i.e) they are not casually related, then c and d are
said to be concurrent events denoted as c||d.
Fig 1 shows the communication of messages m1 and m2 between three processes p1, p2 and p3.
a, b, c, d, e and f are events.
It can be inferred from the diagram that, ab; cd; ef; b->c; df; ad; af; bd; bf.
Also a||e and c||e are concurrent events.
************************
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 60