You are on page 1of 14

Short answer questions

1. What is a distributed System?

→ A Distributed System is a collection of independent computers that are physically


separated but are connected to a centralized computer network equipped with Distributed
System software.
→ All computers in a distributed network communicate with each other by sharing resources
and performing tasks assigned to them in order a achieve a common goal.
2. State the characteristics of distributed systems.
1. Differences between various computers and the ways in which they communicate
are mostly hidden from users
2. Users and applications can interact with a distributed system in a consistent and
uniform way, regardless of where and when Interaction takes place.
3. Relatively easy to expand or scale.
4. Be continuously available
5. Exhibit distributed transparency
6. Extensibility
7. Fault tolerance
8. Openness
3. Define the role of middleware in distributed systems.

→ Middleware is a software component that provides services between two or


more applications and can be used by them.
→ It is an intermediate layer of software that sits between the application and the network.
→ It is used in distributed systems to provide common services, such as authentication,
authorization, compilation for best performance on particular architectures,
input/output translation, and error handling.
4. What are the different types of distributed systems?
1. Distributed Computing Systems- for High Performance Computing (a) Cluster Computing
Systems (b) Grid Computing Systems
2. Distributed Information System- (a) Transaction Processing System (b) Enterprise Application
Integration
3. Distributed Pervasive Systems- Ubiquitous Systems
5. List different types of distributed transparency.
Transparency Description
Access Hide different data representations and how a resource is accessed
Location Hide where a resource is located
Migration Hide that a resource can be moved to another location
Relocation Hide that a resource can be moved to another location while in use
Replication Hide that a resource is replicated
Concurrency Hide that a resource maybe shared by several competitive users
Failure Hide the failure and recovery of a resource
6. What is the difference between multi-processor and multicomputer.
Multi-processor Multi-computer
A system with two or more CPUs that allow A set of computers connected by the
simultaneous processing of programs. communication network that works jointly to
solve a computation problem.
Easier to process. Less easy to program/
More difficult and costly to build. Easier to cost and effective to build.
Supports parallel computing. Supports distributed computing.
7. What is an architectural style in distributed system?
Sofware architectures are mainly responsible for developing large systems, the idea is-
1. Expressing the style in terms of components.
2. Exchange of data in between components is dependent on the way components are
connected.
3. Configuration of elements into the system.
8. What is the difference between layered and object based architectural styles.
Layered Architecture Object based Architecture
It separates layers of computers from each It is based on loosely coupled arrangement of
other, giving it a much modular approach. objects with no specific sequential set of steps
that need to be carried out for a given call.
the calls always follow a predefined path, and Each of the components are referred to as
that each layer can be easily replaced or objects that can interact with other objects
modified without affecting the entire through a given connector or interface.
architecture.
Example- OSI model Example- Java RMI, web Services

9. How communication takes place in Distributed Systems?


Inter-process communication – low-level communication paradigm, 4 IPC models are-
1. Remote Procedure Call
2. Remote Method Invocation
3. Message-Oriented Communication
4. Stream-Oriented Communication
10. Define Inter-process communication. Give an example?

→ Inter-process communication (IPC) is a mechanism that allows processes to communicate


with each other and synchronize their actions.
→ The communication between these processes can be seen as a method of co-operation
between them.
→ Example- n number of applications can communicate with the X server through network
protocols.
11. What is meant by Remote Procedure Call (RPC)?

→ Remote Procedure Call is a powerful technique for constructing distributed client-server


based applications.
→ It is based on extending the conventional local procedure calling so that the called
procedure need not exist in the same address space as the calling procedure.
→ It is usually accomplished by a request- response message passing mechanism.
12.What is light-weight process? Give an example.

→ Light-weight processes (LPWs) bridge the user level and the kernel level.
→ Each process contains one or more LWP, each of which runs one or more threads.
→ Lightweight Remote Procedure Call is a communication facility designed and optimized
for cross-domain communications in microkernel operating systems.
13. Differentiate between asynchronous and synchronous RPC.
Asynchronous RPC Synchronous RPC
Client continues after issuing the RPC The client will block until a reply is returned
request. from server.
Server immediately sends a reply back to the It allows the construction of client-server
client the moment the RPC request is applications, using a demand/response
received, after which it calls the requested protocol with management of
procedure. transactions.
The reply acts as an acknowledgment to the The client is blocked until a response is
client that the server is going to process the returned from the server, or a user-
RPC. The client will continue without further defined optional timeout occurs.
blocking as soon as it has received the server's
acknowledgment.
The system does not guarantee that the RPC guarantees at-most-once semantics for
message has been deposited at the the delivery of the request. It also guarantees
destination location. that the response received by a client is
definitely that of the server and corresponds
effectively to the request
Fig. Client -server interaction in (b) The interaction using asynchronous RPC.
traditional RPC.

14. Define multicasting.


→ When the host process tries to communicate with a designated group of processes in a
distributed system at the same time.
→ 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.
Fig. A multicast Communication- P1 process communicating with only a group of the process
in the system
Long answer questions

1. Explain in detail the goals of distributed systems (5mark)


Goals of distributed systems
1. Easily connect users/resources
2. Exhibit distributed transparency
3. Support openness
4. Be scalable –in size, geographically, and
administratively
1. Making Resources Accessible
→ Main goal of a distributed system is to make it easy for users and applications to access
remote resources and to share the resources in a controlled and efficient way.
→ Resources can be printers, computers, storage facilities, data files, webpages
and networks.
2. Distribution Transparency
→ A distributed system that is able to present itself to users and applications as if it were a
single computer is said to exhibit Distributed Transparency.
Transparency Description
Access Hide differences in data representation and how a resource is accessed
Location Hide where a resource is located
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 is replicated
Concurrency Hide that a resource may be shared by several competitive users
Failure Hide the failure and recovery of a resource
3. Openness
→ Offer services according to the standard rules that describe the syntax and semantics
of those services.
→ Distributed systems services are specified through interfaces which are often described
in the Interface Definition Language (IDL).
4. Extensibility
→ A distributed system should be easy to configure out of different components
(possibly from different developers).
→ It should be easy to add new components or replace existing ones without affecting those
components that stay in place.
→ Scalability of a system is measured wrt-
1. Size can easily add more users and resources to the system.
2. Geographic extent users and resources may lie far apart.
3. Administrative scalability can be easy to manage even if it spans many
independent administrative organizations.
2. Define distribution transparency and explain different types of transparency. (5 marks)
3. Explain Distributed Computing Systems with examples.
Distributed Computing Systems

→ It is a collection of computer resources usually owned by a single entity connected


together such that users can lease access to a share of their combined power.
→ It is Location independent so users can access the desired service from anywhere in the
world using any device with any supported system.
→ It is Cost-effective- the whole infrastructure is owned by the provider and requires no
capital outlay by the user.
→ It has Reliability as it can be enhanced by way of multiple redundant sites.
→ It is used in performance computation which requires high computing.

Fig. Architecture of Cluster Computing Fig. Architecture of Grid Computing


System System
Cluster Computing Systems

→ It is a collection of connected computers that work together as a unit to perform


operations together, functioning in a single system.
→ Clusters are generally connected quickly via Local Area Networks and each node is
running the same operating system.
→ When input comes from a client to the main computer, the master CPU divides the task
into simple jobs and sends it to slave nodes to do it.
→ When the jobs are done, the salve nodes send the results back to the master node which
shows the result to the main computer.
→ Examples: Linux-based Beowulf clusters, MOSIX (from Hebrew University).
Grid Computing Systems

→ It is a collection of computer resources usually owned by multiple parties and in multiple


locations connected together such that users can share access to their combined power.
→ It can easily span a wide-area network, heterogeneous environment, crosses
administrative/geographic boundaries and supports Virtual Organization (VOs)
→ Each system can belong to a different administrative domain and can differ greatly in
terms of hardware, software, and implementation of network technology.
→ Different departments have different computer with different operating systems to make
the control node present.
4. Explain Transaction Processing system. What is the role of TP monitor in distributed
systems?
Distributed Information System is a set of information systems physically distributed over
multiple sites which are connected with some kind of communication network.
There are 2 types of Distributed Information systems-
1. Transaction Processing Systems (TPS)
2. Enterprise Application Integration (EAI)
Transaction Processing Systems (TPS)
→ It works across different servers using multiple communication models.
→ Operations on a datasbase are usually carried out in the form of 4 transactions (ACID)-
1. Atomic- The transaction taking place must be indivisible for the others to ensure that
each transaction either happens completely or not at all.
2. Consistent- The transaction should be consistent after it has been done. To not violate
systems in variants.
3. Isolated- If two or more transactions are running at the same time, the transaction taking
place must be indivisible for the others and to each of them and to other processes, the
final result looks as all the transactions rank sequentially
4. Durable- Once a transaction commits no matter what happens, it goes forward and the
result become permanent.
TP monitor
In a company’s middleware systems, the component that manages distributed transactions forms
the application integration core at the server. This is referred to as TP monitor.
Its main task is allowing an application to access multiple servers by providing a transactional
programming model.
Many requests are sent to the server to ger the result to ensure each request gets successfully
executed and deliver result to each request, this work is handled by the TP monitor.
5. What are client and server stubs in RPC. Explain in detail the steps involved in doing a
remote computation through RPC.
Remote Procedure Call (RPC)

→ It is a powerful technique for constructing distributed client-server based applications to


achieve transparency.
→ It is based on the conventional Local Procedure Calling so that the called procedure need
not exist in the same address space as the calling procedure.
→ The two processes maybe on the same system or not with a network connecting them.
Working of RPC
The procedure is split into 2 parts-
1. The Client stub implements the interface on a local machine through which the remote
functionality can be invoked.
2. The server stub implements the actual functionality.

Steps in RPC
1. Client procedure calls client stub in normal way
2. Client stub builds message, calls local OS
3. Client's OS sends message to remote OS
4. Remote OS gives message to server stub
5. Server stub unpacks parameters, calls server
6. Server does work, returns result to the stub
7. Server stub packs it in message, calls local OS
8. Server's OS sends message to client's OS
9. Client's OS gives message to client stub
10. Stub unpacks result, returns to client
6. Write in detail about Remote procedure call, message-oriented communication. (10
marks) OR Explain the basic operations of RPC with a neat diagram. (5 marks)
Message oriented communication

→ It is the communication between two applications or systems based on the exchange of


individually addressed messages.
→ Each message is routed from one application to another based on the destination address
carried in each message.
→ In a messaging scenario, an application posts information to a message queue.
→ One or more receiving applications retrieve the data from the queue.
→ The sending application and receiving applications can be running at the same time, or they
can interact with the queue at different times.
→ The flexibility of messaging makes it ideal for loosely coupled systems that may be
developed, deployed, and managed independently.
→ Message queues also provide a reliable means of communication among part-time trading
partners that may not maintain constant connections with each other.
→ Message-Oriented Middleware (MOM) is a software or hardware infrastructure
supporting sending and receiving messages between distributed systems.
7. a. Explain the Design issues of Distributed Systems.
b. Explain about multithreading in distributed systems.
a. Design issues of Distributed Systems
1. Heterogeneity is applied to the network, computer hardware, operating system and
implementation of different developers.
2. Openness of the distributed system is determined primarily by the degree to which new
resource-sharing services can be made available to the users.
3. Scalability of the system should remain efficient even with a significant increase in the
number of users and resources connected.
4. Security of information system has three components Confidentially, integrity and
availability. Encryption protects shared resources, keeps sensitive information secrets
when transmitted.
5. Failure handling is difficult in distributed systems because the failure is partial i, e, some
components fail while others continue to function.
6. Concurrency- Any object that represents a shared resource in a distributed system must
ensure that it operates correctly in a concurrent environment.
7. Transparency ensures that the distributes system should be perceived as a single entity by
the users or the application programmers rather than the collection of autonomous
systems, which is cooperating. The user should be unaware of where the services are
located and the transferring from a local machine to a remote one should be transparent.
b. Multithreading in distributed systems
Threads provide a convenient means of allowing blocking system calls without blocking the
entire process in which the thread is running.
This property makes threads to be used in distributed systems.
Multi-threaded clients

→ To achieve acceptable levels of perceived performance it is often necessary to hide


communication Latencies.
→ Consequently, a requirement exists to start communications while doing something else.
→ Example- modern web browsers
→ This leads to the notion of truly parallel streams of data arriving at a multi thread client
application.
Multi-threaded servers

→ One thread dispatcher reads incoming requests for a file operation.


→ The requests are sent by client to a well known end point for this server.
→ After examining the requests, the server chooses blocked worker thread and hands it the
request.
→ Blocking system calls make programming easier and parallelism improves performance.
→ Th single threaded server retains the ease and simplicity by blocking system calls but
gives up some amount of performance.

Fig. A multithreaded server organized in a dispatcher/worker model


8. Write short notes on architectural styles of distributed systems. OR Describe the
Architectural models of distributed systems. (5 marks)
Several styles have by now been identified, of which the most important ones for distributed
systems are-
1. Layered Architecture

→ Components are organized in layer fashion where a component in layer L i is allowed to


call components in underlying layer L i-1
→ Requests go down the hierarchy whereas the results flow upward.
→ This model has been widely adopted by the networking community.

→ 1. 2.
2. Object-based architecture
→ Each object corresponds to components and these components are connected through
Remote Procedure Call.
→ This software architecture matches client server system architecture.
3. Data-centered architecture

→ The idea is that the processes communicate through a common (passive or active)
repository.
→ For example, a wealth of networked applications has been developed that rely on a shared
distributed file system in which virtually all communication takes place through files.

→ 3. 4.
4. Event-based Architecture
→ Processes communicate through propagation of events which also may carry data.
→ The basic idea is that processes publish events after which the middleware ensures that
only those processes that subscribed to those events will receive them.
→ The main advantage of event-based systems is that processes are loosely coupled.
9. Draw centralized system architecture.
→ Centralized systems are systems that use client/server architecture where one or more
client nodes are directly connected to a central server.
→ It is the most commonly used type of system in many organizations where a client sends
a request to a company server and receives the response.
Characteristics of Centralized System
1. Presence of a global clock All client nodes/slave nodes sync up with the global clock
(the clock of the central node/master node.
2. One single central unit serves/coordinates all the other nodes in the system.
3. Dependent failure of components- Central node failure causes the entire system to
fail because when the server is down, no other entity is there to send/receive
responses /requests.
rchitecture of Centralized System
1. Client-Server Architecture
→ Processes in a distributed system are split into two potentially overlapping groups in the
fundamental client-server architecture.
→ A server is a program that provides a particular service, such as a database service or
a file system service.
→ A client is a process that sends a request to a server and then waits for the server to
respond before requesting a service from it.
→ This client-server interaction known as the request-reply behavior is shown in the
figure below-

2. Application Layering Architecture


a. User interface level- implemented by clients, consist of programs that let users interact with
applications.
b. The Processing level- is the middle part of architecture and the logical part of the system
where all the processing actions are performed on user interaction and data levels by processing
requests from user interface.
c. Data level- contains the programs that maintain the actual data on which applications operate,
typically implemented on the server side.
10. Define virtualization. Explain the role of virtualization in distributed systems. (10
marks) OR Explain the role of virtualization in Distributed systems. (5 marks)
Virtualization is the transparent sharing of virtual resources such as a server, desktop, operating
system, file, storage or network by many clients by abstracting computer resources creating an
external interface that hides an underlying implementation.
Role of Virtualization in distributed systems

→ The main goal of virtualization is to manage workloads by radically transforming


traditional computing to make it more scalable.
→ It is the most effective way to reduce IT expenses and boost efficiency large to mid -size
and small organizations
→ It allows you to run multiple operating systems and applications on a single server,
consolidated hardware to get vastly higher productivity from fewer servers and simplify
the management, maintenance and the deployment of new applications.
→ The clients are not aware of each other and of other available resources.
→ There are various levels at which virtualization can be implemented to increase the
performance of a distributed network.
→ Every distributed system provides a programming interface to higher-level software
(Fig. a)
→ To emulate the behavior of other systems, virtualization essentially involves extending or
replacing an existing interface. (Fig. b)

Fig. a- General organization between a


program, interface and system Fig. b- General organization of virtual
system A on top of system B

→ Having each application run on its own virtual computer with associated libraries and
operating systems which in turn run on a common platform, virtualization can help
minimize the diversity of platforms and machines.
→ A high degree of portability and flexibility is offered by virtualization.
Architecture of Virtual Machines
Computer systems offer 4 different types of interfaces at 4 different levels-
1. An interface between hardware and software consisting of machine instructions that can
be invoked by any program
2. An interface between hardware and software consisting of machine instructions that can
be invoked only by privileged programs, such as operating system.
3. An interface consisting of system calls as offered by an operating system.
4. An interface consisting of library calls generally forming an Application Programming
Interface (API).


Fig. A process virtual machine with multiple instances of applications or runtime combinations
10. Describe the different alternatives for code migration.

→ Code migration in distributed systems has traditionally taken the form of


process migration, in which an entire process is moved from one machine to
another.
→ The basic concept is that if processes are moved from heavily loaded to lightly loaded
machines, overall system performance can be improved.
Models for Code Migration
1. A process has three segments (a) Code segment (b) Execution segment (c) Resource segment
2. Weak vs strong mobility
(a) weak mobility: only code segment + initialization data migrated, e.g., Java applets
(b) strong mobility: code segment + execution segment
3. Sender initiated VS Receiver initiated migration.
Alternatives for code migration-

You might also like