CS3551 DC - Unit - I Qbank Final

Download as pdf or txt
Download as pdf or txt
You are on page 1of 60

AALIM MUHAMMED SALEGH

COLLEGE
OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY

R2021 – SEMESTER – V

CS3551– DISTRIBUTED COMPUTING

UNIT – I : INTRODUCTION
Question Bank

III YEAR – B.Tech. – IT -2023 -2024

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 1
SYLLABUS
CS3551 DISTRIBUTED COMPUTING LTPC
3003
COURSE OBJECTIVES:
 To introduce the computation and communication models of distributed systems

UNIT IINTRODUCTION 8

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.

TOTAL TOPICS: 11
COURSE OUTCOMES:
Upon the completion of this course, the student will be able to
Course Outcomes (COs)

CO1 Explain the foundations of distributed systems (K2)

TEXT BOOKS
1) Kshemkalyani Ajay D, Mukesh Singhal, “Distributed Computing: Principles, Algorithms and
Systems”, Cambridge Press, 2011.
2) Mukesh Singhal, Niranjan G Shivaratri, “Advanced Concepts in Operating systems”, Mc- Graw
Hill Publishers, 1994.

REFERENCES
1) George Coulouris, Jean Dollimore, Time Kindberg, “Distributed Systems Concepts and Design”,
Fifth Edition, Pearson Education, 2012.
2) Pradeep L Sinha, “Distributed Operating Systems: Concepts and Design”, Prentice Hall of India,
2007.
3) Tanenbaum A S, Van Steen M, “Distributed Systems: Principles and Paradigms”, Pearson
Education, 2007.
4) Liu M L, “Distributed Computing: Principles and Applications”, Pearson Education, 2004.
5) Nancy A Lynch, “Distributed Algorithms”, Morgan Kaufman Publishers, 2003.
6) Arshdeep Bagga, Vijay Madisetti, “ Cloud Computing: A Hands-On Approach”, Universities
Press, 2014.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 2
CO’s-PO’s & PSO’s MAPPING
CO’s PO’s PSO’s
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3
1 2 2 3 3 1 - - - 2 1 3 3 2 1 1
2 1 3 2 1 2 - - - 2 2 2 2 1 3 2
3 2 2 1 3 3 - - - 3 2 1 1 1 2 1
4 1 2 2 3 1 - - - 3 3 2 1 3 1 1
5 3 3 1 2 3 - - - 3 3 3 1 3 2 3
AVg. 1.8 2.4 1.8 2.4 2 - - - 2.6 2.2 2.2 1.6 2 1.8 1.6
1 - low, 2 - medium, 3 - high, ‘-“- no correlation

BLOOM TAXANOMY LEVELS


Level Description ActionVerbs Bloom’s Definition
BTL1 Remembering Choose, Define, Find, How, List, Exhibit memory of previously
Name, Select, Show, Spell, Tell, learned material
What, When, Where, Which, Who, by recalling facts, terms,
Why basic concepts, and answers.
BTL2 Evaluating Classify, Compare, Contrast, Demonstrate understanding of
Demonstrate, Explain, Illustrate, facts and ideas by organizing,
Outline (OR) Describe, Relate, comparing, translating,
Show, Summarize, Translate interpreting, giving
descriptions, and stating main
ideas.
BTL3 Analyzing Analyze, Assume, Categorize, Solve problems to new
Classify, Compare, Contrast, situations by applying
Discover, Distinguish, Divide, acquired knowledge, facts,
Examine, Inspect, List, Simplify, techniques and rules in a
Survey different way.
BTL4 Applying Apply, Build, Choose, Construct, Examine and break
Develop, Identify, Organize, Plan, information into parts by
Select, Solve, Utilize identifying motives or causes.
Make inferences and find
evidence to support
generalizations.
BTL5 Understanding Classify, Compare, Contrast, Present and defend opinions
Demonstrate, Explain, Extend, by making judgments about
Illustrate, Infer, Interpret, Notify, information, validity of ideas,
Outline, Relate, Show, Summarize, or quality of work based on a
Translate set of criteria.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 3
BTL6 Creating Adapt, Build, Change, Choose, Compile information together
Combine, Compile, Compose, in a different way by
Construct, Create, Design, Develop, combining elements in a new
Discuss, Elaborate, Estimate, pattern or proposing
Formulate, Improve, Invent, alternative solutions.
Maximize, Minimize, Modify,
Originate, Plan, Predict, Propose,
Solve, Suppose, Test

COURSE MATERIAL REFERENCE DETAILS

UNIT NO TEXT/ REFERENCE BOOK PAGE


NO
UNIT -I T1) Kshemkalyani Ajay D, Mukesh Singhal, “Distributed 1 To 35
Computing: Principles, Algorithms and Systems”, Cambridge Press,
2011.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 4
UNIT I
INTRODUCTION
Introduction: Definition-Relation to Computer System Components – Motivation – Message
- Passing Systems versus Shared Memory Systems – Primitives for Distributed
Communication – Synchronous versus Asynchronous Executions – Design Issues and
Challenges; A Model of Distributed Computations: A Distributed Program – A Model of
Distributed Executions – Models of Communication Networks – Global State of a
Distributed System.
PART A
Blooms
S.
No. Question CO Taxonomy
Level

1 Define distributed system / What is meant distributed system?

 A distributed system is a collection of independent computers


that appears to its users as a single coherent system.
CO1 BTL-1
 A distributed system is one in which components located at
networked communicate and coordinate their actions only by
passing message.
 A distributed system consists of multiple components,
possibly across geographical boundaries that communicate
and coordinate their actions through message passing.
 Distributed computing is a field of computer science that
studies distributed systems. Wikipedia

2 List the characteristics of distributed system


 Programs are executed concurrently, support for
resource sharing.
 Openness
 Concurrency CO1 BTL-3
 Scalability
 Fault Tolerance (Reliability)
 Transparency
 Components can fail independently(isolation,
crash)

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 5
3 What is the significance of distributed system?
a) Concurrency of computers. CO1
b) No global clock. BTL-1
c) Independent failures

4 List the examples of distributed system.


 The internet, intranet.
 Department computing cluster CO1 BTL-3
 Corporate systems
 Cloud systems (e.g. Google,Microsoft, etc.)
 Mobile and ubiquitous computing

5 Why we do you need distributed system?

a) Functional distribution: Computers have different functional CO1 BTL-1


capabilities (i.e.,
sharing of resources with specific functionalities).
b) Load distribution/balancing: Assign tasks to processors such
that the overall
system performance is optimized.
c) Replication of processing power: Independent processors
working on the same
task.
d) Superior Power: Distributed system consisting of collections
of microcomputers may have processing powers that no
supercomputer will ever achieve.
e) Physical separation: Systems that rely on the fact that
computers are physically separated (e.g., to satisfy reliability
requirements).
f) Economics: Collections of microprocessors offer a better
price/performance ratio
than large mainframes.mainframes:10 times faster, 1000
times as expensive.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 6
6 List the Key components of Distributed Computing System.

a) Devices or Systems: The devices or systems in a distributed CO1 BTL-1


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.

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

8 What is meant by location aware computing?

•Mobile computing is the performance of computing tasks while CO1 BTL-1


the users are on the move and away from their residence intranet
but still provided with access to resources via the devices they
carry with them.

•They can continue to access the intranet, they can continue to


access resources in their home intranet, and there is increasing
provision for users to utilize resources such as printers that are
conveniently nearby as they move around.

•This is known as location aware computing.

9 What are the Advantages of DistributedSystems?


i) Performance
ii) Distribution
iii) Reliability (fault tolerance) CO1
iv) .Incremental growth BTL-1
v) Sharing of data/resources
vi) Communication

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 7
10 What are the Disadvantages of Distributed Systems?
MAY/JUNE 2016, NOV/DEC 2016
1.Difficulties of developing distributed software
2.Networking problems
3.Security problems

Software
Little software exists compared to PCs (for example) but the CO1
situation is improving with the cloud. BTL-1
Networking
Still slow and can cause other problems (e.g., when
disconnected)
Security
Data may be accessed by unauthorized users through
network interfaces
Privacy
Data may be accessed securely but without the
owner’s consent (significant issue in
modern systems)
11 What are the Applications of Distributedsystems?
 Email
 News
 Multimedia information systems - video conferencing
 Airline reservation system CO1 BTL-1
 Banking system
 File downloads (BitTorrent)
 Messaging

12 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.
13 What is Message Passing System? Where is MPS used? Why is
it required?
Definition: MPS CO1 BTL-1
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.
Use:
• Mainly the message passing is used for communication.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 8
• 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.

14 List the Types of Message Passing.


Types of Message Passing are:
a) Synchronous message passing CO1 BTL-1
b) Asynchronous message passing
c) Hybrids

15 What is Synchronous Execution and Asynchronous Execution?


Synchronous Execution

 Synchronous execution is the simplest way of executing code. CO1


BTL-1
 In a synchronous program, each line of code is executed in
order, one after the other.
 This means that if a line of code takes a long time to execute,
the entire program will be blocked until that line of code is
finished.

Asynchronous Execution

 Asynchronous execution is a way of executing code that allows


multiple lines of code to run at the same time.
 This means that if a line of code takes a long time to
execute, other lines of code can continue to run in the
meantime

16 Compare Asynchronous and synchronous programming.

Asynchronous Synchronous programming


programming CO1
Async is multi-thread, Sync is single-thread, so BTL-2

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 9
which means operations or only one operation or
programs can run in program will run at a time.
parallel.
Async is non-blocking, Sync is blocking — it will
which means it will send only send the server one
multiple requests to a request at a time and will
server. wait for that request to be
answered by the server.
Async increases throughput Sync is slower and more
because multiple operations methodical.
can run at the same time.

17 Name the Primary issues in the design of the distributed


systems.
i. providing access to remote data in the face of failures, CO1 BTL-2
ii. file system design, and
iii. directory structure design.

18 What are different types of transparencies required in


distributed systems? NOV/DEC 2017
i) Access Transparency
ii) Execution Transparency CO1
iii) Replication Transparency BTL-1
iv) Performance Transparency
v) Configuration Transparency

19 What are the Advantages of Distributed Systems over


Centralized?

i) Economics CO1
ii) Speed BTL-1
iii) Geographic and ResponsibilityDistribution
iv) Reliability
v) Extendibility

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
10
20 Write the Resource Sharing of Distributed system.
NOV/DEC 2017
1.Share hardware, 2.software, 3.data and information
Hardware Devices CO1
Printers, disks, memory, sensors BTL-1
Software Sharing
Compilers, libraries, toolkits, computational Kernels
Data
Databases, files
21 Define Distributed Program.
Definition: Distributed Program
•A distributed program is composed of a set of asynchronous
CO1
processes that communicate by message passing over the BTL-1

communication network.
•A distributed program consists of a collection of processes that
work concurrently and communicate by explicit message
passing.
•Each process can access a set of variables which are disjoint
from the variables that can be changed by any other process.
•A computer program that runs within a distributed system is
called a distributed program, and distributed programming is the
process of writing such programs.
22 What are the Design issues of Distributed system?
 Openness
 Resource Sharing
 Concurrency CO1
 Scalability BTL-1
 Fault-Tolerance
 Transparency
 High-Performance

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
11
23 Write the issues arising from Distributed Systems
 Naming - How to uniquely identify resources.
 Communication - How to exchange data and information
reliably with good performance.
 Software Structure - How to make software open, extensible,
scalable, with high-performance.
 Workload Allocation - Where to perform computations and CO1 BTL-1
various services.
 Consistency Maintenance - How to Keep consistency at a
reasonable cost.
24 List the challenges in distributed system.
1. Heterogeneity
2. Openness CO1
BTL-1
3. Security
4. Scalability
5. Failure handling
6. Concurrency
Transparency
25 How distributed processes are executed in distributed Computing
Environment?
Distributed Process execution
•The execution of a process consists of a sequential execution of CO1
its actions. BTL-1
•The actions are atomic and the actions of a process are modeled
as three types of events:
i) Internal events,
ii) Message send events, and
iii) Message receive events.

26 What are the objectives of modeling actions by mean of


occurrences of events?
Occurrence of events
•The occurrence of events changes the states of respective CO1
processes and channels. BTL-1
•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.
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
12
•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.
27 What is Communication in Distributed Systems?
 Communication is an essential part of distributed systems -
e.g., clients and servers must communicate for request and
response. CO1
BTL-1
 Communication normally involved - transfer of data from
sender to receiver - synchronization among processes.

28 What are types of Communication in DistributedSystems?


i) Client-Server
ii) Group Multicast
iii) Function Shipping CO1
iv) Performance of distributed systems depends critically on BTL-1
communication
v) performance
29 Define Distributed System Software Structure
 It must be easy to add new services (flexibility, extensibility,
openness requirements) CO1
 Kernel is normally restricted to
o memory allocation BTL-1
o process creation and scheduling
o interposes communication
o peripheral device handling

30 What is concurrency in Distributed Systems?


 Both services and applications provide resourcesthat can
be shared by clients in a distributed system.
 There is therefore a possibility that several clientswill CO1
attempt to access a shared resource at the sametime.
 For example, a data structure that records bids for an BTL-1
auction may be accessed very frequentlywhen it gets
close to the deadline time.

31 What is Transparency? APR/MAY 2017


Transparency is defined as the concealment from the user
and the application programmer of the separation of components CO1 BTL-1
in a distributed system, so that the system is perceived as a whole
rather than as a collection of independent components.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
13
32 Define heterogeneity.
The Internet enables users to access services and run
applications over a heterogeneous collection of computers and
networks.
Heterogeneity (that is, variety and difference) applies to all
of the following: CO1
• Networks; BTL-1
• Computer hardware;
• Operating systems;
• Programming languages;
• Implementations by different developers.

33 List any two resources of hardware and software, which


can be shared in distributed systems with example. (NOV 2017)
i) Hardware – Printer, Disks, Fax machine, Router, CO1 BTL-1
Modem.
ii) Software – Application Programs, Shared Files, Shared
Databases, Documents, Services.
34 State the objectives of resource sharing model APRIL/MAY
2018
a) resources are made available
b) resources can be used
c) service provider and user interact with each other CO1
d) accessing remote resources
e) sharing them in a controlled andefficient way BTL-1

35 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!)

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
14
PART B

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

ii) Illustrate with necessary diagram how distributed components are


CO1
loosely coupled. (6)
BTL-5

2 Define distributed systems. What are the significant issues and


challenges of the distributed systems? CO1 BTL-1
NOV/DEC 2017, APRIL/MAY 2018

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

ii) Enlighten ANY TWO examples of distributed systems. (4)


MAY/JUNE 2016 CO1 BTL-5

4. Describe the need of Distributed System with following basis:


a) Requirements (5) CO1 BTL-2
b) Major Characteristics (4)
c) Reasons (4)

5 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 Memory
System (SMS). (5) CO1
BTL-2

6 i) List and describe three primitives in Distributed Computing.

(6) CO1 BTL-1 &


BTL-2
ii) Describe briefly on Send and its and types and Receive
primitives and its types. (7)
CO1
BTL-2

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
15
PART – C

1 i) List and describe ANY SIX major design issues of Distributed


System. (6)
CO1 BTL-1 &
ii) Describe major challenges in Distributed systems challenges BTL-2
from a system perspective. (9)
CO1
BTL-2

2 Describe in details on model of Distributed Computing. (15) CO1 BTL-2

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page
16
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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 17
 The architecture of a Distributed Computing System is typically a Peer-to-Peer Architecture, where
devices or systems can act as both clients and servers and communicate directly with each other.
 The three basic components of a distributed system include
a) primary system controller,
b) system data store, and
c) database.

 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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 18
 The secondary controller is a process controller or a communications controller.
 It’s responsible for regulating the flow of server processing requests and managing the system’s
translation load.
 It also governs communication between the system and VANs or trading partners.

b) User-interface client

 The user interface client is an additional element in the system that provides users with important
system information.
 This is not a part of the clustered environment, and it does not operate on the same machines as
the controller.
 It provides functions that are necessary to monitor and control the system.

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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 19
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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 20
 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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 21
1. Heterogeneity:

 The Internet enables users to access services and run applications over a heterogeneous collection
of computers and networks.

Heterogeneity (that is, variety and difference) applies to all of the following:
i) Hardware devices: computers, tablets, mobile phones, embedded devices, etc.
ii) Operating System: Ms Windows, Linux, Mac, Unix, etc.
iii) Network: Local network, the Internet, wireless network, satellite links, etc.
iv) Programming languages: Java, C/C++, Python, PHP, etc.
v) Different roles of software developers, designers, system managers

 Different programming languages use different representations for characters and data structures
such as arrays and records.
 These differences must be addressed if programs written in different languages are to be able to
communicate with one another.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 22
 Programs written by different developers cannot communicate with one another unless they use
common standards, for example, for network communication and the representation of primitive
data items and data structures in messages.
 For this to happen, standards need to be agreed and adopted – as have the Internet protocols.

Middleware :
 The term middleware applies to a software layer that provides a programming abstraction as
well as masking the heterogeneity of the underlying networks, hardware, operating
systems and programming languages.
 Most middleware is implemented over the Internet protocols, which themselves mask the
differences of the underlying networks, but all middleware deals with the differences in
operating systems and hardware .

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.

2.Transparency:

Transparency is defined as the concealment from the user and the application programmer of the
separation of components in a distributed system, so that the system is perceived as a whole rather than as
a collection of independent components.

In other words, distributed systems designers must hide the complexity of the systems as much as they
can.

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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 23
 Migration: Hide that a resource may move to another location
 Relocation: Hide that a resource may be moved to another location while in use Replication
Hide that a resource may be copied in several places
 Concurrency: Hide that a resource may be shared by several competitive users Failure Hide
the failure and recovery of a resource
 Persistence: Hide whether a (software) resource is in memory or a disk

3. Openness

 The openness of a computer system is the characteristic that determines whether the system can
be extended and re-implemented in various ways.
 The openness of distributed systems is determined primarily by the degree to which new
resource-sharing services can be added and be made available for use by a variety of client
programs.
 If the well-defined interfaces for a system are published, it is easier for developers to add new
features or replace sub-systems in the future.
Example: Twitter and Facebook have API that allows developers to develop theirs own software
interactively.

4. Concurrency

 Both services and applications provide resources that can be shared by clients in a distributed
system. There is therefore a possibility that several clients will attempt to access a shared resource
at the same time.
 For example, a data structure that records bids for an auction may be accessed very frequently
when it gets close to the deadline time.
 For an object to be safe in a concurrent environment, its operations must be synchronized in such
a way that its data remains consistent.
 This can be achieved by standard techniques such as semaphores, which are used in most
operating systems.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 24
5. Security

 Many of the information resources that are made available and maintained in distributed systems
have a high intrinsic value to their users.
 Their security is therefore of considerable importance.

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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 25
 When faults occur in hardware or software, programs may produce incorrect results or may stop
before they have completed the intended computation.
 The handling of failures is particularly difficult.
**************************

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

1.Significant 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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 26
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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 27
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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 28
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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 29
4) Describe the need of Distributed System with following basis:
a) Requirements (5)
b) Major Characteristics (4)
c) Reasons (4)

ANSWER KEY:

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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 30
 For example, payroll data within a multinational corporation is both too large and too sensitive to
be replicated at every branch office/site.
 It is therefore stored at a central server which can be queried by branch offices.
 Similarly, special resources such as supercomputers exist only in certain locations, and to access
such supercomputers, users need to log in remotely.
 Advances in the design of resource-constrained mobile devices as well as in the wireless
technology with which these devices communicate have given further impetus to the importance
of distributed protocols and middleware.

4. Enhanced reliability

 A distributed system has the inherent potential to provide increased reliability because of the
possibility of replicating resources and executions, as well as the reality that geographically
distributed resources are not likely to crash/malfunction at the same time under normal
circumstances.

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

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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 32
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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 33
c) For better performance

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

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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 34
 Generally, one host at one site, the server, has a resource that another host at another site, the
client (or user), would like to use. A general structure of a distributed system is shown in Figure

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

5) i) What are Message Passing System(MPS) and Shared Memory System (SMS)?

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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 35
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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 36
Message-Passing Communication: for data transfer

 Tasks exchange data through communications by sending and receiving explicit messages.
 Data transfer usually requires cooperative operations to be performed by each process.
 For example, a send operation must have a matching receive operation.

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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 37
 It enables nodes to exchange information, coordinate activities, and share data without relying on
shared memory or direct method invocations.
 Models like synchronous and asynchronous message passing offer different synchronization and
communication semantics to suit system requirements.
 Synchronous message passing ensures sender and receiver synchronization, while asynchronous
message passing allows concurrent execution and non-blocking communication.

ii) Compare Message Passing System (MPS) and Shared Memory System (SMS). (5)

ANSWER KEY:

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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 38
All remote data accesses are explicit and not involve communication by the
therefore the programmer is always aware underlying runtime support.
of whether a particular operation is in-
process or involves the expense of
communication.

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

6) i) List and describe three primitives in Distributed Computing. (6)

ANSWER KEY:

PRIMITIVES FOR DISTRIBUTED COMMUNICATION

Design primitives in distributed system


There four major types of design primitives for distributed system
a) Blocking
b) Non-blocking
c) Synchronous
d) Asynchronous primitives

Message passing primitives in distributed system


What are the message passing primitives in distributed system?
 Two primitives,
i) SEND and
ii) RECEIVE
are used in the message passing scheme.

 The SEND primitive sends a message to a destination process.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 39
 While the RECEIVE primitive receives a message from a specified source process.

 Message send and message receive communication primitives are denoted


Send() and Receive(), respectively.
 A Send primitive has at least two parameters
– the destination, and the buffer in the user space, containing the data to be sent.
 Similarly, a Receive primitive has at least two parameters – the source from which the data is to
be received (this could be a wildcard), and the user buffer into which the data is to be received.

Message invoking Primitives for distributed communication


 There are two ways of sending data when the Send primitive is invoked
i) the buffered option and
ii) the unbuffered option.
 The buffered option which is the standard option copies the data from the user buffer to the kernel
buffer.
 The data later gets copied from the kernel buffer onto the network.
 In the unbuffered option, the data gets copied directly from the user buffer onto the network.

 For the Receive primitive, the buffered option is usually required because the data may already
have arrived when the primitive is invoked, and needs a storage place in the kernel.

The following are some definitions of blocking/non-blocking and synchronous/


asynchronous primitives:
a) Synchronous primitives
 A Send or a Receive primitive is synchronous if both the Send() and Receive() handshake with
each other.
 The processing for the Send primitive completes only after the invoking processor learns that the
other corresponding Receive primitive has also been invoked and that the receive operation has
been completed.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 40
 The processing for the Receive primitive completes when the data to be received is copied into the
receiver’s user buffer.

b) Asynchronous primitives
 A Send primitive is said to be asynchronous if control returns back to the invoking process after
the data item to be sent has been copied out of the user-specified buffer.
 It does not make sense to define asynchronous Receive primitives.

c) Blocking primitives
A primitive is blocking if control returns to the invoking process after the processing for the primitive
(whether in synchronous or asynchronous mode) completes.

d) Non-blocking primitives
 A primitive is non-blocking if control returns back to the invoking process immediately after
invocation, even though the operation has not completed.

 For a non-blocking Send, control returns to the process even before the data is copied out of the
user buffer.
 For a non-blocking Receive, control returns to the process even before the data may have arrived
from the sender.
 For non-blocking primitives, a return parameter on the primitive call returns a system-generated
handle which can be later used to check the status of completion of the call. The process can
check for the completion of the call in two ways.
 First, it can keep checking (in a loop or periodically) if the handle has been flagged or posted.
 Second, it can issue a Wait with a list of handles as parameters.
 The Wait call usually blocks until one of the parameter handles is posted.

 Presumably after issuing the primitive in non-blocking mode, the process has done whatever
actions it could and now needs to know the status of completion of the call, therefore using a
blocking Wait() call is usual programming practice.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 41
The code for a non-blocking Send would look as shown in Figure 1.7.

 If at the time that Wait() is issued, the processing for the primitive (whether synchronous or
asynchronous) has completed, the Wait returns immediately.
 The completion of the processing of the primitive is detectable by checking the value of handle_k.
 If the processing of the primitive has not completed, the Wait blocks and waits for a signal to
wake it up.
 When the processing for the primitive completes, the communication subsystem software sets the
value of handle_k and wakes up (signals) any process with a Wait call blocked on this handle_k.
 This is called posting the completion of the operation.

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

ii) Describe briefly on Send and its and types and Receive primitives and its types. (7)

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 42
ANSWER KEY:

 The SEND primitive sends a message to a destination process.

 While the RECEIVE primitive receives a message from a specified source process.

 Message send and message receive communication primitives are denoted


Send() and Receive(), respectively.
Four types of the Send primitive

1) synchronous blocking,
2) synchronous non-blocking,
3) asynchronous blocking, and
4) asynchronous non-blocking

For the Receive primitive, there are the blocking synchronous and non-blocking synchronous versions.

These versions of the primitives are illustrated in Figure 1.8 using a timing diagram.
Here, three time lines are shown for each process:
CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 43
(1) for the process execution,
(2) for the user buffer from/to which data is sent/received, and
(3) for the kernel/communication subsystem.

a) Blocking synchronous Send (See Figure 1.8(a))


 The data gets copied from the user buffer to the kernel buffer and is then sent over the network.
 After the data is copied to the receiver’s system buffer and a Receive call has been issued, an
acknowledgement back to the sender causes control to return to the process that invoked the Send
operation and completes theSend.

b) Non-blocking synchronous Send (See Figure 1.8(b))


 Control returns back to the invoking process as soon as the copy of data from the user buffer to
the kernel buffer is initiated.
 A parameter in the non-blocking call also gets set with the handle of a location that the user
process can later check for the completion of the synchronous send operation.
 The locationgets posted after an acknowledgement returns from the receiver, as per the semantics
described for (a).
 The user process can keep checking for the completion of the non-blocking synchronous Send by
testing the returned handle, or it can invoke the blocking Wait operation on the returned
handleV(Figure 1.8(b)).

c) Blocking asynchronous Send (See Figure 1.8(c))


 The user process that invokes the Send is blocked until the data is copied from the user’s buffer to the
kernel buffer. (For the unbuffered option, the user process that invokes the Send is blocked until the
data is copied from the user’s buffer to the network.)

d) Non-blocking asynchronous Send (See Figure 1.8(d))


 The user process that invokes the Send is blocked until the transfer of the data from the user’s buffer
to the kernel buffer is initiated. (For the unbuffered option, the user process that invokes the Send is
blocked until the transfer of the data from the user’s buffer to the network is initiated.)

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 44
 Control returns to the user process as soon as this transfer is initiated, and a parameter in the non-
blocking call also gets set with the handle of a location that the user process can check later using
the Wait operation for the completion of the asynchronous Send operation.

 The asynchronous Send completes when the data has been copied out of the user’s buffer.
 The checking for the completion may be necessary if the user wants to reuse the buffer from which
the data was sent.

Two types of Receive primitives

a) Blocking Receive (See Figure 1.8(a))


 The Receive call blocks until the data expected arrives and is written in the specified user buffer.
 Then control is returned to the user process.

b) Non-blocking Receive (See Figure 1.8(b))


 The Receive call will cause the kernel to register the call and return the handle of a location that
the user process can later check for the completion of the non-blocking Receive operation.
 This location gets posted by the kernel after the expected data arrives and is copied to the user-
specified buffer.
 The user process can check for the completion of the non-blocking Receive by invoking the Wait
operation on the returned handle. (If the data has already arrived when the call is made, it would
be pending in some kernel buffer, and still needs to be copied to the user buffer.)
***************************

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 45
PART – C (1 X 15 Marks) – ANSWER KEY

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

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.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 46
 There is some overlap between these categories.
 However, it is useful to identify these categories because of the deep differences among the:
(i) The systems community,
(ii) The theoretical algorithms community within distributed computing, and
(iii) The forces driving the emerging applications and technology.

 For example, the current practice of distributed computing follows the client–server architecture
to a large degree, whereas that receives scant attention in the theoretical distributed algorithms
community.

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.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 47
Major design issues of distributed systems

The following are some of the major design issues of distributed systems:
Here are a number of design considerations to take into account.
i) Heterogeneity:
 Heterogeneity is applied to the network, computer hardware, operating system, and
implementation of different developers.
 A key component of the heterogeneous distributed system client-server environment is
middleware.
 Middleware is a set of services that enables applications and end-user to interact with each
other across a heterogeneous distributed system.

ii) Openness:
 The openness of the distributed system is determined primarily by the degree to which new
resource-sharing services can be made available to the users.
 Open systems are characterized by the fact that their key interfaces are published.
 It is based on a uniform communication mechanism and published interface for access to shared
resources.
 It can be constructed from heterogeneous hardware and software.

iii) Scalability:
 The scalability of the system should remain efficient even with a significant increase in the
number of users and resources connected.
 It shouldn’t matter if a program has 10 or 100 nodes; performance shouldn’t vary.
 A distributed system’s scaling requires consideration of a number of elements, including size,
geography, and management.
iv) Security:
 The security of an information system has three components Confidentially, integrity, and
availability.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 48
 Encryption protects shared resources and keeps sensitive information secrets when
transmitted.

v) Failure Handling:
 When some faults occur in hardware and the software program, it may produce incorrect
results or they may stop before they have completed the intended computation so corrective
measures should to implemented to handle this case.
 Failure handling is difficult in distributed systems because the failure is partial i, e, some
components fail while others continue to function.

vi) Concurrency:
 There is a possibility that several clients will attempt to access a shared resource at the same
time. Multiple users make requests on the same resources, i.e. read, write, and update.
 Each resource must be safe in a concurrent environment. Any object that represents a shared
resource in a distributed system must ensure that it operates correctly in a concurrent
environment.

vii) Transparency:
 Transparency ensures that the distributed system should be perceived as a single entity by the
users or the application programmers rather than a collection of autonomous systems, which is
cooperating.
 The user should be unaware of where the services are located and the transfer from a local
machine to a remote one should be transparent.

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.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 49
 Synchronization is another important aspect in DSS because Distributed System do not have a
global clock.
 It is required that synchronization be done as per the actual real time.

ix) Scheduling issue for distributed system:


 Focuses on Scheduling problems in homogeneous and heterogeneous parallel distributed systems.
 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

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 50
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;
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.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 51
 Naming in mobile systems provides additional challenges because naming cannot easily be tied to
any static geographical topology.

iv) Synchronization
 Mechanisms for synchronization or coordination among the processes are essential.
 Mutual exclusion is the classical example of synchronization, but many other forms of
synchronization, such as leader election are also needed.
 In addition, synchronizing physical clocks, and devising logical clocks that capture the essence of
the passage of time, as well as global state recording algorithms, all require different forms of
synchronization.

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.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 52
viii) Security
 Distributed systems security involves various aspects of cryptography, secure channels, access
control, key management – generation and distribution, authorization, and secure group
management.
ix) Applications Programming Interface (API) and transparency
 The API for communication and other specialized services is important for the ease of use and
wider adoption of the distributed systems services by non-technical users.

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.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 53
Algorithmic challenges in distributed computing
The summarization of the key algorithmic challenges in distributed computing are:

i) Designing useful execution models and frameworks


 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

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 54
(i) capture the logic and inter-process dependencies within the distributed program,
(ii) track the relative progress at each process.

iv) Synchronization/coordination mechanisms


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

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 55
vi) Distributed program design and verification tools
 Methodically designed and verifiably correct programs can greatly reduce the overhead of
software design, debugging, and engineering.
 Designing mechanisms to achieve these design and verification goals is a challenge.

vii) Performance
 Although high throughput is not the primary goal of using a distributed system, achieving good
performance is important. In large distributed systems, network latency (propagation and
transmission times) and access to shared resources can lead to large delays which must be
minimized.
 The user perceived turn-around time is very important.

The following are some example issues arise in determining the performance:

• Metrics
 Appropriate metrics must be defined or identified for measuring the performance of theoretical
distributed algorithms, as well as for implementations of such algorithms.
 The former would involve various complexity measures on the metrics, whereas the latter would
involve various system and statistical metrics.

• Measurement methods/tools
 As a real distributed system is a complex entity and has to deal with all the difficulties that arise
in measuring performance over a WAN/the Internet, appropriate methodologies and tools must be
developed for measuring the performance metrics.

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

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 56
2) Describe in details on model of Distributed Computing. (15)

ANSWER KEY:

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.

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 )

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 57
hi is the set of events produced by pi and

Occurrence of events
 The occurrence of events changes the states of respective processes and channels.
 The occurrence of events changes the states of respective processes and channels, thus
causing transitions in the global system state.

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

Fig: Space time distribution of distributed systems

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 58
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:
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.

 a→b, if a and b are events in the same process and a occurred before b.
 a→b, if a is the event of sending a message m in a process and b is the event of the same message
m being received by another process.

CS3551- DISTRIBUTED COMPUTING Prepared by Er. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 59
 If a→b and b→c, then a→c. Lamports law follow transitivity property.

Consider two events c and d; c→d and d→c is false (i.e) they are not casually related, then c and d are
said to be concurrent events denoted as c||d.

Fig: 1: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. K.KHAJA MOHIDEEN, ASST. PROF. /IT, AMSCE Page 60

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy