0% found this document useful (0 votes)
569 views68 pages

CS3551 DC - Int - I - Answer Key 7.9.23

The document contains an internal examination answer key for Distributed Computing. It covers two units: [1] Introduction to distributed systems and communication primitives; and [2] Logical time and global state. The key tests knowledge of distributed system components, communication models, logical clocks, global state, and snapshot algorithms. It contains multiple choice and descriptive questions assessing different cognitive levels related to key concepts in distributed systems.

Uploaded by

Mohamed Shaaheen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
569 views68 pages

CS3551 DC - Int - I - Answer Key 7.9.23

The document contains an internal examination answer key for Distributed Computing. It covers two units: [1] Introduction to distributed systems and communication primitives; and [2] Logical time and global state. The key tests knowledge of distributed system components, communication models, logical clocks, global state, and snapshot algorithms. It contains multiple choice and descriptive questions assessing different cognitive levels related to key concepts in distributed systems.

Uploaded by

Mohamed Shaaheen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • Introduction to Distributed Computing
  • Components of a Distributed System
  • Applications and Trends in Distributed Systems
  • Design Issues in Distributed Systems
  • Message Passing and Models
  • Time and Synchronization in Distributed Systems
  • Message Ordering Paradigms
  • Group Communication in Distributed Systems
  • Challenges in Distributed System Design
  • Models of Distributed Computing
  • Global States and Consistent Cuts

AALIM MUHAMMED SALEGH COLLEGE OF ENGINEERING

DEPARTMENT OF INFORMATION TECHNOLOGY


R2021- SEMESTER – V
CS3551 – DISTRIBUTED COMPUTING

INTERNAL EXAMINATION – I – ANSWER KEY


DATE: 07.09.2023 TIME : 9:30 AM TO 12:30 PM
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.
UNIT II
LOGICAL TIME AND GLOBAL STATE
Logical Time: Physical Clock Synchronization: NTP – A Framework for a System of Logical Clocks
Scalar Time – Vector Time; Message Ordering and Group Communication: Message Ordering
Paradigms – Asynchronous Execution with Synchronous Communication – Synchronous Program
Order on Asynchronous System – Group Communication – Causal Order – Total Order; Global State
and Snapshot Recording Algorithms: Introduction – System Model and Definitions – Snapshot
Algorithms for FIFO Channels.
PART A
Blooms
S.
No. Question CO Taxonomy
Level

1 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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 1
2 What are the two major types of Distributed Systems?

a) Client Server System can be applied with multiple servers. CO1 BTL-1

b) Peer-to-Peer Systems: Peer-to-Peer System communication


model works as a decentralized model in which the system works
like both Client and Server.

3 Write the different trends in distributed systems.


 The emergence of pervasivenetworking technology;
 The emergence of ubiquitous computing coupled with the CO1 BTL-1
desire to support user mobility in distributed systems;
 The increasing demand formultimedia services;
 The view of distributed systems as autility.
4 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.
5 Define global state in distributed system.

Definition: Global state


CO1
 The global state of a distributed system is the set of local states BTL-1
of each individual processes involved in the system plus the
state of the communication channels.
 The components that constitutes global state i.e. a cut is
consistent if every message received was previously sent (but
not necessarily vice versa!)
6 What is meant by group communication?

Group communication is a multicast operation is more appropriate- CO2 BTL-1


this is an operation that sends a single message from one process to
each of the members of a group of process, usually in such a way that
the membership of the group is transparent to the sender.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 2
7 How a FIFO execution is implemented?
 To implement a FIFO logical channel over a non-FIFO
channel,a separate numbering scheme is used to sequence the CO2 BTL-1
messages.
 The sender assigns a sequence number and appends
connection_id to each message and then transmitted then the
receiver arranges the incoming messages according to the
sender’s sequence numbers and accepts “next” messages per
sequence.
8 Differentiate between synchronous and asynchronous communication.
synchronous form of asynchronous form of
CO2 BTL-1
communication communication
• In synchronous form • In asynchronous form of
of communication, the communication, the use of the send
sending and receiving operation is non-blocking in that
processes synchronize at the sending process is allowed to
every message. proceed as soon as the message has
been copied to a local buffer and
the transmission of the message
proceeds in parallel with the
sending process.
• In this case, both send and The receive operation can have
receive are blocking operations. blocking and non-blocking
variants.
In Synchronous In Asynchronous transmission, the
transmission, the time time interval of transmission is not
interval of transmission is constant, it is random.
constant.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 3
9 Define Logical time and logical clocks.
Logical time
 Lamport proposed a model of logical time that can be used to CO2
BTL-1
provide an ordering among the events at processes running in
different computers in a distributed system.
 Logical time allows the order in which the messages are
presented to be inferred without recourse to clocks.

Logical clocks
Lamport invented a simple mechanism by which the happened
before ordering can be captured numerically, called a logical clock.
 A Lamport logical clock is a ncreasing software counter,
whose value need bear no particular relationship to any
physical clock.
 Each process pi Keeps its own logical clock, Li , which it uses
to apply so- called Lamport timestamps to events.
 We denote the timestamp of event e at pi by Li(e) , and by L(e)
we denote the timestamp of event e at whatever process it
occurred at.
10 What are the two phases in obtaining a global snapshot?
 First locally recording the snapshot at every process
CO2 BTL-1
 Second distributing the resultant global snapshot to all the
initiators

PART B

11(a) List and describe the components of a Distributed System. CO1 BTL-1 &
(7) BTL-2

ii) Illustrate with necessary diagram how distributed components


CO1
are loosely coupled. (6)
BTL-5

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 4
11(b) Define distributed systems. What are the significant issues and
challenges of the distributed systems? CO1 BTL-1

12(a) i) Discuss the different trends in distributed systems. (10) CO1 BTL-6

CO1 BTL-5
ii) Enlighten ANY TWO examples of distributed systems. (4)
12(b) Describe the need of Distributed System with following basis:
a) Requirements (5) CO1 BTL-2
b) Major Characteristics (4)
c) Reasons (4)
13(a) i) What are Message Passing System(MPS) and Shared Memory
System (SMS)? Describe both in terms of Communication in
CO1 BTL-1 &
Distributive Computing requirements. (8)
BTL-2
ii) Compare Message Passing System (MPS) and Shared
BTL-2
Memory System (SMS). (5) CO1

13(b) i) Identify and explain the basic properties of scalar time. (7) CO2 BTL-2
ii) List and explain the basic properties of vector time. (6)
CO2 BTL-1

14(a) What are the different ways of synchronizing physical clocks? CO2 BTL-1 &
Explain Physical clock synchronization algorithm. (13) BTL-2

14(b) i) Explain Logical time and logical clocks. Describe the


different types of logical clocks used in distributive computing
Environment. (8) CO2 BTL-1

ii) Briefly explain the Vector Clock with rules that define this
vector clock. (5)
15(a) Explain in detail on three major message ordering paradigms. CO2 BTL-1
Given example for each one of them. (13)

15(b) What is group communication? What are the Key areas of CO2 BTL-1
applications of group communication? Explain the
programming model for group communication. (13)

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 5
PART – C

16a) CO1 BTL-2

CO2 BTL-1

16b) i)Describe in details on model of Distributed Computing. (7) CO1 BTL-2

ii) Explain global states and consistent cuts with example. (8) CO2 BTL-1

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 6
PART – B( 13 Marks) - ANSWER KEY

1) i) List and describe the components of a Distributed System. (7)

Key components of Distributed Computing System

There are three key components of a Distributed Computing System

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.

Fundamental Principle: make distribution transparent to user.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 7
 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.

 In a non-clustered environment, optional components consist of user interfaces and secondary


controllers.

1. Primary system controller

 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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 8
 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.

2. System data store

 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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 9
ANSWER KEY:

Loosely Coupling in Distributed System

 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.

Eg: Solaris Operating System


 The major Objectives for a Distributed system development are:
1. Making resources easily available.
2. Open & Scalable.
3. Distribution transparency i.e; the fact that the resources are distributed must be hidden.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 10
 Thus the loosely-coupled components in Distributed System provides major support for
performance.

Applications of Distributed Computing Systems

Distributed Computing Systems have a number of applications, including:

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.

Moreover, message transfer delays are finite yet unpredictable.

*****************************

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.

The major challenges in distributed systems are listed below:

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 11
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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 12
 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 .

Heterogeneity and mobile code :

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.

[Link]:

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.

Some terms of transparency in distributed systems are:

 Access : Hide differences in data representation and how a resource is accessed


 Location: Hide where a resource is located

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 13
 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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 14
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.

Security for information resources has three components:

confidentiality (protection against disclosure to unauthorized individuals)

integrity (protection against alteration or corruption),

availability for the authorized (protection against interference with the means to access the resources).

6. Scalability

 Distributed systems must be scalable as the number of user increases.


 The scalability is defined by B. Clifford Neuman as:
 A system is said to be scalable if it can handle the addition of users and resources without
suffering a noticeable loss of performance or increase in administrative complexity
Scalability has 3 dimensions:

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

 Computer systems sometimes fail.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 15
 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.
**************************

3) i) Discuss the different trends in distributed systems. (10)


MAY/JUNE 2016, NOV/DEC 2016, NOV/DEC2017, APRIL MAY 2018
ANSWER KEY

Trends in distributed systems

[Link] changes in current distributed systems: –

 The emergence of pervasive technology


 The emergence of ubiquitous & mobile computing
 The increasing demand of multimedia technology
 The view of distributed systems as a utility

2. Pervasive technology – Modern Internet – Collection of internetworked devices- wired &


wireless – Pervasive resources and devices can be connected at any time and in any place

3. Intranet ISP desktop computer:


backbone satellite link server: network link: A typical portion of the Internet

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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 16
5. Portable & handheld devices in a distributed system.

6. Distributed multimedia systems:


 – The use of multimedia contents in distributed systems
 Multimedia support – Major benefits of multimedia support
 Distributed multimedia computing can be accessed through desktop or mobile devices.
 E.g. live tv broadcast, video-on-demand, IP telephony, webcasting, etc.

7. Distributed computing as a utility – distributed resources as commodity or utility in similar as


water and power. – Physical and logical service resources are rented rather than owned by the
end users.
Physical resources:
e.g. : storage and processing
• Logical services: e.g. email, calendars –

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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 17
ii) Enlighten ANY TWO examples of distributed systems. MAY/JUNE 2016 (4)

ANSWER KEY

Examples of Distributed Systems

 Distributed Systems is to provide motivational examples of contemporary distributed systems


and the great diversity of the associated applications.
 As mentioned in the introduction, networks are everywhere and underpin many everyday services
that we now take for granted: the Internet and he associated World Wide Web, web search, online
gaming, email, social networks, eCommerce, etc.

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.

b) Finance and commerce


 The growth of eCommerce as exemplified by companies such as Amazon and eBay, and
underlying payments technologies such as PayPal; the associated emergence of online banking
and trading and also complex information dissemination systems for financial markets.

c) The information society


 The growth of the World Wide Web as a repository of information and knowledge;
 the development of web search engines such as Google and Yahoo to search this vast repository;
 the emergence of digital libraries and the large-scale digitization of legacy information sources
such as books (for example, Google Books);
 the increasing significance of user-generated content through sites such as YouTube, Wikipedia

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 18
and Flickr;
 the emergence ofsocial networking through services such as Facebook and MySpace.

d) Creative industries and entertainment


 The emergence of online gaming as a novel and highly interactive form of entertainment;
 the availability of music and film in the home through networked media centres and more widely
in the Internet via downloadable or streaming content; the role of user-generated content (as
mentioned above) as a new form of creativity, for example via services such as YouTube;
 the creation of new forms of art and entertainment enabled by emergent (including networked)
technologies.

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.

g) Transport and logistics: The use of location technologies are

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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 19
4) Describe the need of Distributed System with following basis:
a) Requirements (5)
b) Major Characteristics (4)
c) Reasons (4)

ANSWER KEY:

a) Requirements of Distributed System

The motivation for using a distributed system is some or all of the following

requirements:

1) Inherently distributed computations

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.

3. Access to geographically remote data and resources

 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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 20
 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.

Reliability entails several aspects:

• availability, i.e., the resource should be accessible at all times;

• 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

5. Increased performance/cost ratio

 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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 21
 Such a configuration provides a better performance/cost ratio than using special parallel
machines.
 This is particularly true of the NOW configuration.

In addition to meeting the above requirements, a distributed system also offers

the following advantages:

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.

7. Modularity and incremental expandability

 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.

b) Major Characteristics of distributed system


There are several characteristics that define a Distributed Computing System.

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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 22
Reasons for building a Distributed System

a) Fundamental concepts of 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.

Why make a System distributed?

a) It is inherently distributed :

For example, sending a message from your mobile phone to your friend’s phone.

b) For better reliability

Even if one node fails, the system as a whole keep functioning.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 23
c) For better performance

Get data from nearby node rather than one halfway round the world.

d) To solve bigger problem:

For example, a huge amount of data will not be fit into a single machine.

There are four major reasons for building distributed systems:

a) Resource sharing
b) Computation speedup
c) Reliability
d) Communication.

b) Interconnectivity principles of Distributed System

 A distributed system is a collection of loosely coupled processors interconnected by a


communication network.
 From the point of view of a specific processor in a distributed system, the rest of the processors
and their respective resources are remote, whereas its own resources are local.
 The processors in a distributed system may vary in size and function. They may include small
microprocessors, workstations, minicomputers, and large general-purpose computer systems.
 These processors are referred to by a number of names, such as sites, nodes, computers,
machines, and hosts, depending on the context in which they are mentioned.
 We mainly use site to indicate the location of a machine and host to refer to a specific system at a
site.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 24
 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)?

Describe both in terms of Communication in Distributive Computing requirements.

(8)

ANSWER KEY:

Message Passing System(MPS)

What is a Message Passing System(MPS)?

 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.

Where is message passing used? Why is it required?


CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 25
Use:
 Mainly the message passing is used for communication.
 It is used in distributed environments where the communicating processes are present on remote
machines which are connected with the help of a network.
Message Passing Requirement:
 In message-passing systems, processes communicate with one another by sending and receiving
messages over a communication channel.

 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.

Message Passing Model

 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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 26
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.

Example for MPS

Role of MPS in Distribution Systems

 Message passing is a flexible and scalable method for inter-node communication in distributed
systems.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 27
 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:

Differences between Message Passing System(MPS) and Shared Memory System(SMS)

Message Passing Distributed Shared Memory


Services Offered: The processes share variables directly, so
Variables have to be marshalled from one no marshalling and unmarshalling. Shared
process, transmitted and unmarshalled into variables can be named, stored and
other variables at the receiving process. accessed in DSM.
Processes can communicate with other Here, a process does not have private
processes. They can be protected from one address space. So one process can alter the
another by having private address spaces. execution of other.
This technique can be used in This cannot be used to heterogeneous
heterogeneous computers. computers.
Synchronization between processes is Synchronization is through locks and
through message passing primitives. semaphores.
Processes communicating via message Processes communicating through DSM
passing must execute at the same time. may execute with non-overlapping
lifetimes.
Efficiency: Any particular read or update may or may

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 28
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.

***************************

1) i) Identify and explain the basic properties of scalar time. (7)


ii) List and explain the basic properties of vector time. (6)

1) i) Identify and explain the basic properties of scalar time. (7)

ANSWER KEY:

Introduction to Scalar time


Scalar Clocks provide a naive solution to the problem, giving an eventually consistent
ordering of events.

Scalar time in logical time

 Scalar Time is a simple implementation that uses local clocks and two rules to ensure
correct order.
 Other methods, such as using timestamps, can also be used but must obey causality to
work properly.
 By using logical clocks, processes in a distributed system can work together in an
organized and efficient way.

 Proposed by Lamport in 1978 as an attempt to totally order events in adistributed system.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 29
 Time domain is the set of non-negative integers.

 The logical local clock of a process pi and its local view of the global timeare squashed
into one integer variable Ci .

Evolution of scalar time

 Scalar Clocks provide a naive solution to the problem, giving an eventually consistent
ordering of events.

Figure 3.1 shows evolution of scalar time.

The space-time diagram of a distributed execution

i) Consistency Property
Scalar clocks satisfy the monotonicity and hence the consistency property:
for two events ei and ej , ei → ej =⇒ C(ei ) < C(ej ).

ii) Total Ordering properties


 Scalar clocks can be used to totally order events in a distributed system.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 30
 The main problem in totally ordering events is that two or more events at different
processes may have identical timestamp.
 For example in Figure 3.1, the third event of process P1 and the second event of process
P2 have identical scalar timestamp.

iii) Event counting propoerties


 If the increment value d is always 1, the scalar time has the following
 interesting property:
 if event e has a timestamp h, then h-1 represents the minimum logical duration, counted
in units of events, required before producing the event e;
 We call it the height of the event e.
 In other words, h-1 events have been produced sequentially before the event e regardless
of the processes that produced these events.
 For example, in Figure 3.1, five events precede event b on the longest causal path ending
at b.
**************

ii) List and explain the basic properties of vector time. (6)

ANSWER KEY:

Introduction to Vector time

Definition: Vector Time


 A vector clock is a data structure used for determining the partial ordering of events
in a distributed system and detecting causality violations.
 A vector clock of a system of N processes is an array/vector of N logical clocks,
one clock per process; a local "largest possible values" copy of the global clock-
array is kept in each process.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 31
 The system of vector clocks was developed independently by Fidge, Mattern and
Schmuck.

 In the system of vector clocks, the time domain is represented by a set of n-dimensional
non-negative integer vectors.
An Example of Vector Clocks

Properties of Vector Time

a) Isomorphism
If events in a distributed system are timestamped using a system of vector clocks, we have the
following property.
If two events x and y have timestamps vh and vk, respectively, then

x → y ⇔ vh < vk x ǁ y ⇔ vh ǁ vk
Thus, there is an isomorphism between the set of partially ordered events produced by a
distributed computation and their vector timestamps.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 32
b) Strong Consistency
The system of vector clocks is strongly consistent; thus, by examining the vector timestamp of
two events, we can determine if the events are causally related.
However, Charron-Bost showed that the dimension of vector clocks cannot be less than n, the
total number of processes in the distributed computation, forthis property to hold.
c) Event Counting

 If d=1 (in rule R1), then the i th component of vector clock at process pi ,vti [i ], denotes the
number of events that have occurred at pi until that instant.

 So, if an event e has timestamp vh, vh[j] denotes the nuΣ


mber of events executed by process pj

that causally precede e.

 Clearly, vh[j] – 1 represents the total number of events that causally precede e in the
distributed computation.
**********************

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 33
2) What are the different ways of synchronizing physical clocks? Explain Physical clock
synchronization algorithm. (13)

ANSWER KEY:

Different ways of synchronizing physical clocks

Clock Synchronization

 Synchronized clocks incorporate technology allowing the clocks to receive time data and
display accurate and uniform time throughout a facility.
 Synchronized clocks are used in many types of facilities for the purpose of having all
clocks in the facility show the exact same time.

Synchronizing physical clocks

 If two systems do not interact with each other then there is no need of synchronization.

 So, what usually matters is that processes agree on the order in which events occur rather
than the time at which they occurred.

 Logical clocks does not need exact time. So, absolute time is not a constrain in logical
clocks. Logical clocks just bothers about the message to be delivered and not about the
timings of the events occurred.

 Using Interrupts, computer generally updates a software clock. More the interrupts, higher
the overhead. Accuracy will be more.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 34
 The most common logical clock synchronization algorithms for distributed systems are
Lamport’s algorithm.

 It is used in the situation where ordering is important not the time.

Problem two systems to agree on time


Clock synchronization can be achieved by 2 ways:

i) External Clock Synchronization and

ii) Internal Clock Synchronization.

 External clock synchronization is the one in which an external reference clock is


present.
 It is used as a reference and the nodes in the system can set and adjust their time
accordingly.
 Internal clock synchronization is the one in which each node shares its time with other
nodes and all the nodes set and adjust their times accordingly.

Physical clock synchronization algorithms

Physical clock synchronization algorithms can be classified as

1. centralized and
2. distributed.
These have one node with a real-time receiver and are called time server node.

The clock time of this node is regarded as correct and used as reference time.

[Link] clock synchronization algorithms

These have one node with a real-time receiver and are called time server node. The clock time of
this node is regarded as correct and used as reference time.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 35
The goal of this algorithm is to keep the clocks of all other nodes synchronized with time server
node.

i. Cristian’s Algorithm

 In this method each node periodically sends a message to the server. When the time server
receives the message it responds with a message T, where T is the current time of server
node.
 Assume the clock time of client be To when it sends the message and T1 when it receives
the message from server. To and T1 are measured using same clock so best estimate of
time for propagation is (T1-To)/2.
 When the reply is received at clients node, its clock is readjusted to T+(T1-T0)/2. There
can be unpredictable variation in the message propagation time between the nodes hence
(T1-T0)/2 is not good to be added to T for calculating current time.
 For this several measurements of T1-To are made and if these measurements exceed some
threshold value then they are unreliable and discarded. The average of the remaining
measurements is calculated and the minimum value is considered accurate and half of the
calculated value is added to T.
 Advantage-It assumes that no additional information is available.
 Disadvantage- It restricts the number of measurements for estimating the value.

[Link] Berkley Algorithm

 This is an active time server approach where the time server periodically broadcasts its
clock time and the other nodes receive the message to correct their own clocks.
 In this algorithm the time server periodically sends a message to all the computers in the
group of computers. When this message is received each computer sends back its own
clock value to the time server. The time server has a prior knowledge of the approximate
CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 36
time required for propagation of a message which is used to readjust the clock values. It
then takes a fault tolerant average of clock values of all the computers. The calculated
average is the current time to which all clocks should be readjusted.
 The time server readjusts its own clock to this value and instead of sending the current
time to other computers it sends the amount of time each computer needs for
readjustment. This can be positive or negative value and is calculated based on the
knowledge the time server has about the propagation of message.

[Link] algorithms

Distributed algorithms overcome the problems of centralized by internally synchronizing for


better accuracy. One of the two approaches can be used:

[Link] Averaging Distributed Algorithms

 In this approach the clock process at each node broadcasts its local clock time in the form
of a “resync” message at the beginning of every fixed-length resynchronization interval.
This is done when its local time equals To+iR for some integer i, where To is a fixed time
agreed by all nodes and R is a system parameter that depends on total nodes in a system.
 After broadcasting the clock value, the clock process of a node waits for time T which is
determined by the algorithm.
 During this waiting the clock process collects the resync messages and the clock process
records the time when the message is received which estimates the skew after the waiting
is done. It then computes a fault-tolerant average of the estimated skew and uses it to
correct the clocks.

[Link] Averaging Distributes Algorithms

 The global averaging algorithms do not scale as they need a network to support broadcast
facility and a lot of message traffic is generated.
 Localized averaging algorithms overcome these drawbacks as the nodes in distributed
systems are logically arranged in a pattern or ring.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 37
 Each node exchanges its clock time with its neighbors and then sets its clock time to the
average of its own clock time and of its neighbors.

************************

3) i) Explain Logical time and logical clocks. Describe the different types of logical clocks
used in distributive computing Environment. (8)

ii) Briefly explain the Vector Clock with rules that define this vector clock. (5)

ANSWER KEY:

3) i) Logical time and logical clocks

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 38
Logical time

 The logical time in distributed systems is used to maintain the consistent ordering of
events.
 The concept of causality, i.e. the causal precedence relationship, is fundamental for
distributed systems. Usually, it is tracked using physical time, but physical clocks are hard
to maintain in a distributed system, so logical clocks are used instead.
 The idea that makes logical clocks different is that these are designed to maintain the
information about the order of events rather than pertaining to the same notion of time as
the physical clocks.

Logical Clock

 Logical Clocks refer to implementing a protocol on all machines within your distributed
system, so that the machines are able to maintain consistent ordering of events within
some virtual timespan.
 Is a mechanism for capturing chronological and causal relationships in a distributed
system.
 Distributed systems may have no physically synchronous global clock, so a logical clock
allows global ordering on events from different processes in such systems.
 The first implementation, the Lamport timestamps, was proposed by Leslie Lamport in
1978.

Definition: Logical Clock

A logical clock is a mechanism for capturing chronological and causal relationships in a


distributed system. Often, distributed systems may have no physically synchronous global
clock. Wikipedia

 A logical clock is a mechanism for capturing chronological and causal relationships in a


distributed system.
 Distributed systems may have no physically synchronous global clock, so a logical clock
allows global ordering on events from different processes in such systems.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 39
Example :

 If we go outside then we have made a full plan that at which place we have to go first,
second and so on.
 We don’t go to second place at first and then the first place.
 We always maintain the procedure or an organization that is planned before.
 In a similar way, we should do the operations on our PCs one by one in an organized way.

**********************

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 40
4) Explain in detail on three major message ordering paradigms. Given example for
each one of them. (13)

ANSWER KEY:

MESSAGE ORDERING PARADIGMS

Hierarchy of ordering paradigms


There are four message ordering types and are:

i) non-FIFO
ii) FIFO
iii) causal order
iv) synchronous order

The following diagram illustrates the four types of executions:

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 41
Fig. 3.1 Hierarchy of execution classes (a) Venn diagram (b) Example
Execution

 A program using synchronous communication is easiest to develop and verify.

 A program using non- FIFO communication, resulting in an A-execution, is hardest to


design and verify.

 This is because synchronous order offers the most simplicity due to the restricted number
of possibilities, whereas non-FIFO order offers the greatest difficulties because it admits
a much larger set of possibilities that the developer and verifier need to account for.

(i) Non-FIFO or Asynchronous executions (A-execution)


 An asynchronous execution (or A-execution) is an execution (E, ≺) for which the
causality relation is apartial order.
 No causality cycles
 On any logical link between two nodes in the system, messages may be delivered in
any order, not necessarily first-in first-out. Such executions are also known as non-
FIFO executions.

Fig. 3.1 Illustrating FIFO and non-FIFO execution

(a) An A-execution that is not a FIFO execution (b) An A-execution that is also a FIFO
execution
CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 42
(ii) FIFO executions
 A FIFO execution is an A-execution in which,

for all (s, r) and (s1, r1) ∈ T, (s ∼ s1 and r ∼ r1 and s ≺ s1) =⇒ r ≺ r1.

 On any logical link in the system, messages are necessarily delivered in the order in
which they are sent.
 To implement FIFO over non-FIFO link: use {seq_num, conn_id} per message.
Receiver uses buffer toorder messages.

(iii) Causally ordered (CO) executions


 A CO execution is an A-execution in which,

for all (s, r) and (s1, r1) ∈ T, (r ∼ r1 and s ≺ s1) =⇒ r ≺ r1.

 If two send events s and s1 are related by causality ordering (not physical time
ordering), then a causally ordered execution requires that their corresponding receive
events r and r1 occur in the same order at all common destinations.
 If s and s1 are not related by causality, then CO is blankly satisfied.
Examples

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 43
Fig. 3.2 Illustration of causally ordered executions.

(a) Not a CO execution (b) , (c) and (d) CO executions

(a) Violates CO because s1 ≺ s3 and at the common destination P1, we have r3 ≺r1.

(b) Satisfies CO. Only s1 and s2 are related by causality but the destinations of the
corresponding messages aredifferent.
(c) Satisfies CO. No send events are related by causality.
(d) Satisfies CO. s2 and s1 are related by causality but the destinations of the
corresponding messages are different. Similarly for s2 and s3.

Causal order is useful for applications


o requiring updates to shared data,
o implementing distributed shared memory,
o fair resource allocation such as granting of requests for distributed mutual exclusion.

Causal Order: Other Characterizations


(1) Message order (MO)
A MO execution is an A-execution in which,

for all (s, r) and (s1, r1) ∈ T, s ≺ s1 =⇒ ¬(r ≺ r1)

Example:

s1 ≺ s3 but ¬(r3 ≺ r1) is false =⇒ MO not satisfied

(2) Empty-interval execution

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 44
An execution (E, ≺) is an empty-interval (EI) execution if for each pair of events (s, r)
∈ T, the open interval set {x ∈ E | s ≺x ≺r} in the partial order is empty.

Example:

 Consider any message, say m2.

 There does not exist any event x such that s2 ≺ x ≺ r2.

 This holds for allmessages in the execution. Hence, the execution is EI.

(3) Common Past and Future


An execution (E, ≺) is CO if and only if for each pair of events (s, r) ∈ T and each event e
∈ E,

 weak common past: e ≺r =⇒ ¬(s ≺e)

 weak common future: s ≺e =⇒ ¬(e ≺r)

(iv) Synchronous execution (SYNC)


 When all the communication between pairs of processes uses synchronous send and receive
primitives, the resulting order is the synchronous order.
 As each synchronous communication involves a handshake between the receiver and the
sender, the corresponding send and receive events can be viewed as occuring
instantaneously and atomically.

Example

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 45
Causality in a synchronous execution

The synchronous causality relation << on E is the smallest transitive relation that satisfies
the following: S1: If x occurs before y at the same process, then x << y.
S2: If (s, r) ∈ T, then for all x ∈ E, [(x << s ⇐⇒ x << r) and (s << x
⇐⇒ r << x)]. S3: If x << y and y << z, then x << z.

************************

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 46
5) What is group communication? What are the Key areas of applications of group
communication? Explain the programming model for group communication. (13)

ANSWER KEY

Group communication

What is group communication?

 Group Communication occurs when a single source process simultaneously attempts to


communicate with numerous functions.
 A group is an abstract collection of interrelated operations.
 This abstraction hides the message passing such that the communication seems to be a
standard procedure call.
 Group communication also enables processes from separate hosts to collaborate and
conduct activities in a coordinated way, improving overall system performance.

Group Communication in distributed Systems

i) A broadcast Communication: P1 process communicating with every process in the


system.
 When the host process tries to communicate with every process in a distributed
system at same time.
ii) A multicast Communication: P1 process communicating with only a group of the
process in the system.
 When the host process tries to communicate with a designated group of processes
in a distributed system at the same time.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 47
 This technique is mainly used to find a way to address problem of a high workload
on host system and redundant information from process in system. Multitasking
can significantly decrease time taken for message handling.
iii) A unicast Communication: P1 process communicating with only P3 process.
 When the host process tries to communicate with a single process in a distributed system
at the same time. Although, same information may be passed to multiple processes. This
works best for two processes communicating as only it has to treat a specific process only.

 A group is a collection of interconnected processes with abstraction. This abstraction is to


hide the message passing so that the communication looks like a normal procedure call.
 Group communication also helps the processes from different hosts to work together and
perform operations in a synchronized manner, therefore increasing the overall
performance of the system.
 A group has group members (processes) who can join or leave the group.
 This is done through multicast communication.
 There are three communication modes:
i) Unicast: Process to process communication
ii) Broadcast: Communication to all the process
iii) Multicast: Communication only to a group of processes Process Groups and Objects
Groups

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 48
 An object group is a collection of objects that process the same set of invocations
concurrently.
 Client objects invoke operations on a single, local object, which acts as a proxy for the
group. 
 The proxy uses a group communication system to send the invocations to the members of
the object group.
 Object parameters and results are marshalled as in RMI and the associated calls are
dispatched automatically to the right destination objects/methods.

Types of group communication

i) Closed and open groups:

A group is said to be closed if only members of the group may multicast to it A process in a
closed group delivers to itself any message that it multicasts to the group.

ii) Open and Closed group communication

iii) Overlapping and non-overlapping groups

: In overlapping groups, entities may be members of multiple groups, and non-overlapping


groups imply that membership does not overlap to at most one.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 49
Key areas of applications of group communication

 Group Communication is an important building block for distributed systems, with key
areas of applications including:
 The reliable dissemination of information to potentially large numbers of clients.
 Support for collaborative applications.
 Group communication issues only one multicast operation to send a message to each of a
group of processes instead of issuing multiple send operations to individual processes.

 The use of a single multicast operation instead of multiple send operations enables the
implementation to be efficient in its utilization of bandwidth.
 The implementation can also minimize the total time taken to deliver the message to all
destinations, as compared with transmitting it separately and serially.

 Common use cases for group distributed applications include:


 Web browsers (Tor)
 E-commerce websites (Amazon, eBay)
 Blockchain applications (Bitcoin, Ethereum)
 Cloud computing platforms (AWS, Microsoft Azure)
 Distributed databases (Couchbase, Apache Cassandra)
 Peer-to-peer file-sharing networks (BitTorrent)

Programming model for group communication

 The ordering property of the messages is responsible for controlling the sequence of
messages to be delivered. Some types of message ordering:
i) No order: messages are sent to the group without concern for ordering.
ii) FIFO ordering: messages are delivered in the order in which they were sent.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 50
iii) Casual ordering: messages are sent after receiving another message.
iv) Total ordering: all group members receive all messages in the same order.

 Synchronous and asynchronous systems:

 Group communication is possible in both environments.


 Reliability and ordering in multicast
 In group communication, all members of a group must receive copies of the messages sent
to the group, with delivery guarantees.

Reliable multicast operation is based on:

Integrity: delivering the message correctly only once

Validity: guaranteeing that a message sent will eventually be delivered.

 Group communication demands relative ordering of messages delivered to multiple


destinations.

The following are the types of message ordering:

i) FIFO ordering: If a process sends one message before another, it will be delivered in this
order at all processes in the group.
ii) Causal ordering: If a message happens before another message in the distributed system
this so-called causal relationship will be preserved in the delivery of the associated
messages at all processes.
iii) Total ordering: In total ordering, if a message is delivered before another message at one
process, then the same order will be preserved at all processes.

The three main types of communication models in distributed systems are:

a) FIFO (first-in, first-out): each channel acts as a FIFO message queue.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 51
b) Non-FIFO (N-FIFO): a channel acts like a set in which a sender process adds messages
and receiver removes messages in random order.
c) Causal Ordering (CO): It follows Lamport’s law. o The relation between the three models
is given by CO  FIFO  N-FIFO
**********************

PART – C (1 X 15 Marks) – ANSWER KEY

1) i) List and describe ANY SIX major design issues of Distributed System. (6)

ii) Describe major challenges in Distributed systems challenges from a system


perspective. (9)

ANSWER KEY:

1 i) DESIGN ISSUES AND CHALLENGES

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.

 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.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 52
 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.

Two major deep divide reasons for Design practicality are :

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.

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:

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 53
 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.
 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.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 54
 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.

viii) Performance improvement:


 With the rapid growth of parallel and distributed processing in modern computers a high demand
for performance improvement and low cost productivity in real life is desired.
 Moreover challenges like communication fault delay or computation fault delay may occur
because of network failure or machine failure respectively.
 Making fault tolerant DSS is a tough job.
 The ability to tolerate the fault and functioning normally is required by DSS.
 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.

ix) Scheduling issue for distributed system:


 Focuses on Scheduling problems in homogeneous and heterogeneous parallel distributed systems.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 55
 The performance of distributed systems are affected by Broadcast/multicast processing and
required to develop a delivering procedure that completes the processing in minimum time.

x) Controllability and Observability issues:


 Controllability and observability are two important issues in testing because they have an effect
on the capability of the test system to check the conformance of an implementation under test.
 Controllability is the capability of the Test System to force the Implementation under Test to
receive inputs in a given order.

*************

1) ii) Describe major challenges in Distributed systems challenges from a system


perspective. (9)

ANSWER KEY:

7 ii) CHALLENGES

 The Distribution System start addresses the challenges in designing distributed systems from a
system building perspective.

The major challenges are:

a) Security,
b) Maintaining consistency of data in every system,
c) Network Latency between systems,
d) Resource Allocation, or
e) Proper node balancing across multiple nodes

Some of the key challenges include:


i) object storage mechanisms,
ii) efficient object lookup, and
iii) retrieval in a scalable manner;

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 56
iv) dynamic reconfiguration with nodes as well as objects joining and leaving the network randomly;
v) replication strategies to expedite object search;
vi) tradeoffs between object size latency and table sizes;
vii) anonymity,
viii) privacy, and
ix) security.

Distributed systems challenges from a system perspective


The following functions must be addressed when designing and building a distributed system:
i) Communication
 This task involves designing appropriate mechanisms for communication among the processes in
the network.
Some example mechanisms are:
o remote procedure call (RPC),
o remote object invocation (ROI),
o Message-oriented communication versus stream-oriented communication.

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.
 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.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 57
 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.

v) Data storage and access


 Schemes for data storage, and implicitly for accessing the data in a fast and scalable manner
across the network are important for efficiency.
 Traditional issues such as file system design have to be reconsidered in the setting of a distributed
system.

vi) Consistency and replication


 To avoid bottlenecks, to provide fast access to data, and to provide scalability, replication of data
objects is highly desirable.
 This leads to issues of managing the replicas, and dealing with consistency among the
replicas/caches in a distributed setting.
 A simple example issue is deciding the level of granularity (i.e., size) of data access.

vii) Fault tolerance


 Fault tolerance requires maintaining correct and efficient operation in spite of any failures of
links, nodes, and processes.
 Process resilience, reliable communication, distributed commit, checkpointing and
 recovery, agreement and consensus, failure detection, and self-stabilization are some of the
mechanisms to provide fault-tolerance.

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

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 58
 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.

Transparency on Implementation perspective


Transparency deals with hiding the implementation policies from the user, and can be classified as
follows:

i) Access transparency: hides differences in data representation on different systems and


provides uniform operations to access system resources.

ii) Location transparency : makes the locations of resources transparent to the users.

iii) Migration transparency: allows relocating resources without changing names.


The ability to relocate the resources as they are being accessed is relocation transparency.

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.

vii) Scalability and modularity :


 The algorithms, data (objects), and services must be as distributed as possible.
 Various techniques such as replication, caching and cache management, and asynchronous
processing help to achieve scalability.

Algorithmic challenges in distributed computing


The summarization of the key algorithmic challenges in distributed computing are:

i) Designing useful execution models and frameworks

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 59
 The interleaving model and partial order model are two widely adopted models of distributed
system executions.
 They have proved to be particularly useful for operational reasoning and the design of distributed
algorithms.
 The input/output automata model and the TLA (temporal logic of actions) are two other examples
of models that provide different degrees of infrastructure for reasoning more formally with and
proving the correctness of distributed programs.

ii) Dynamic distributed graph algorithms and distributed routing algorithms


 The distributed system is modeled as a distributed graph, and the graph algorithms form the
building blocks for a large number of higher level communication, data dissemination, object
location, and object search functions.
 The algorithms need to deal with dynamically changing graph characteristics, such as to model
varying link loads in a routing algorithm.
 The efficiency of these algorithms impacts not only the user-perceived latency but also the traffic
and hence the load or congestion in the network. Hence, the design of efficient distributed graph
algorithms is of paramount importance.

iii) Time and global state in a distributed system


 The processes in the system are spread across three-dimensional physical space.
 Another dimension, time, has to be superimposed uniformly across space.
 The challenges pertain to providing accurate physical time, and to providing a variant of time,
called logical time.
 Logical time is relative time, and eliminates the overheads of providing physical time for
applications where physical time is not required.

 More importantly, logical time can


(i) capture the logic and inter-process dependencies within the distributed program,
(ii) track the relative progress at each process.

iv) Synchronization/coordination mechanisms

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 60
 The processes must be allowed to execute concurrently, except when they need to synchronize to
exchange information, i.e., communicate about shared data.
 Synchronization is essential for the distributed processes to overcome the limited observation of
the system state from the viewpoint of any one process.
 The synchronization mechanisms can also be viewed as resource management and concurrency
management mechanisms to streamline the behavior of the processes that would otherwise act
independently.

iv) Group communication, multicast, and ordered message delivery


 A group is a collection of processes that share a common context and collaborate on a common
task within an application domain.
 Specific algorithms need to be designed to enable efficient group communication and group
management wherein processes can join and leave groups dynamically, or even fail.
 When multiple processes send messages concurrently, different recipients may receive the
messages in different orders, possibly violating the semantics of the distributed program. Hence,
formal specifications of the semantics of ordered delivery need to be formulated, and then
implemented.

v) Monitoring distributed events and predicates


 Predicates defined on program variables that are local to different processes are used for
specifying conditions on the global system state, and are useful for applications such as
debugging, sensing the environment, and in industrial process control. On-line algorithms for
monitoring such predicates are hence important.
 An important paradigm for monitoring distributed events is that of event streaming, wherein
streams of relevant events reported from different processes are examined collectively to detect
predicates.
 Typically, the specification of such predicates uses physical or logical time relationships.

vi) Distributed program design and verification tools


 Methodically designed and verifiably correct programs can greatly reduce the overhead of
software design, debugging, and engineering.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 61
 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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 62
16) b) i) Describe in details on model of Distributed Computing. (7)

ANSWER KEY:

A MODEL OF DISTRIBUTED EXECUTIONS / COMPUTATIONS

Distributed Process execution


 The execution of a process consists of a sequential execution of its actions.

 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.

 The execution of process pi produces a sequence of events e1, e2, e3, …, and it is denoted by

o Hi: Hi =(hi  i). Here hiare states produced by pi and

o  are the casual dependencies among events pi.

o binary relation →i defines a linear order on these events.


CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 63
o Relation →i expresses causal dependencies among the events of pi .

  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 )
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.

 An internal event changes the state of the process at which it occurs.

 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. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 64
Fig: Space time distribution of distributed systems

Message distribution ordering

i) Casual Precedence Relations

 Causal message ordering is a partial ordering of messages in a distributed computing


environment.
 It is the delivery of messages to a process in the order in which they were transmitted to that
process.
 It places a restriction on communication between processes by requiring that if the transmission
of message mi to process pk necessarily preceded the transmission of message mj to the same
process, then the delivery of these messages to that process must be ordered such that mi is
delivered before mj.

ii) Happen Before Relation


 The partial ordering obtained by generalizing the relationship between two process is called as
happened-before relation or causal ordering or potential causal 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:

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 65
Local ordering:A and B occur on same process and A occurs before B.

Messages: send(m) → receive(m) for any message m


Transitivity: e → e’’ if e → e’ and e’ → e’’

Ordering can be based on two situations:


1. If two events occur in same process then they occurred in the order observed.
2. During message passing, the event of sending message occurred before the event of receiving it.
Lamports ordering is happen before relation denoted
 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.
 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:Communication between processes

 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, ab; cd; ef; b->c; df; ad; af; bd; bf.
 Also a||e and c||e are concurrent events.
************************

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 66
PART – C ( 15 MARKS)

16) ii) Explain global states and consistent cuts with example. (8)

ANSWER KEY

Global states and Consistent cuts

Global state

 The global state of a distributed system is a collection of the local states of its
components, namely, the processes and the communication channels.
 The state of a process at any time is defined by the contents of processor registers,
stacks, local memory, etc. and depends on the local context of the distributed application.
 The state of a channel is given by the set of messages in transit in the channel.

Inconsistent and Consistent global states


A message cannot be received if it was not sent; that is, the state should not violate
causality. Such states are called consistent global states and are meaningful global states.
Inconsistent global states are not meaningful in the sense that a distributed system can never be
in an inconsistent state.

Example:

 Let LS x denote the state of process p after the occurrence of event e x and before the
event e x+1.
 i i i i
1 3 3
 A global state GS1 consisting of local states {LS1 , LS2 , LS3 , LS4 } is 2
inconsistent because the stateof p2 has recorded the receipt of message m12, however,
the state of p1 has not recorded its send.

 A global state GS2 consisting of local states {LS 2 , LS 4 , LS 4 , LS 2} is consistent; all


the channels are empty except C21 that contains message m21.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 67
Cuts of a Distributed Computation

A cut in a space-time diagram is a line joining an arbitrary point on each process line that
slices the space‐time diagram into a PAST and a FUTURE.
 In the space–time diagram of a distributed computation, a zigzag line joining one arbitrary
point on eachprocess line is termed a cut in the computation.
 Such a line slices the space–time diagram, and thus the set of events in the distributed
computation, into a PAST and a FUTURE.
 The PAST contains all the events to the left of the cut and the FUTURE contains all the
events to the right of the cut.
 For a cut C, let PAST(C) and FUTURE(C) denote the set of events in the PAST and
FUTURE of C, respectively.
 Every cut corresponds to a global state and every global state can be graphically
represented as a cut in the computation’s space–time diagram.

Consistent global state

A cut C = {c1, c2, c3, … } is consistent if for all sites there are no events ei and ej such that: (ei -
-> ej ) and (ej --> cj ) and (ei -/-> ci )

 A consistent global state corresponds to a cut in which every message received in the
PAST of the cut was sent in the PAST of that cut. Such a cut is known as a consistent cut.
 A consistent cut obeys causality and any run of the Chandy-Lamport Global Snapshot
algorithm creates a consistent cut.
****************************

CS3551- DISTRIBUTED COMPUTING Prepared by Er. [Link] MOHIDEEN, ASST. PROF. /IT, AMSCE Page 68

CS3551- DISTRIBUTED COMPUTING   Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 1 
 
AALIM MUHAMMED SALEGH COLL
CS3551- DISTRIBUTED COMPUTING   Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 2 
 
2 
What are the two major
CS3551- DISTRIBUTED COMPUTING   Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 3 
 
7 
How a FIFO execution is
CS3551- DISTRIBUTED COMPUTING   Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 4 
 
9 
Define Logical time and
CS3551- DISTRIBUTED COMPUTING   Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 5 
 
11(b) 
Define distributed
CS3551- DISTRIBUTED COMPUTING   Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 6 
 
PART – C  
16a)   
CO1 
CO
CS3551- DISTRIBUTED COMPUTING   Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 7 
 
PART – B( 13 Marks)  - ANS
CS3551- DISTRIBUTED COMPUTING   Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 8 
 
 
 The architecture of a
CS3551- DISTRIBUTED COMPUTING   Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 9 
 
 The secondary controller
CS3551- DISTRIBUTED COMPUTING   Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 10 
 
ANSWER KEY:  
Loosely Cou

You might also like