Distributed Computing Question Bank
Distributed Computing Question Bank
PART - A
Distributed System is a collection of autonomous computer systems that are physically separated but are connected by a
centralized computer network that is equipped with distributed system software. The autonomous computers will communicate
among each system by sharing resources and files and performing the tasks assigned to them.
Shared-memory systems are difficult to build but easy to use, and are ideal for laptops and desktops. Distributed-memory systems
are easier to build but harder to use, comprising many shared-memory computers each with their own operating system and their
own separate memory
A distributed snapshot algorithm captures a consistent global state of a distributed system. A global state can be described by a cut
that indicates the time at which each process “checkpoints” its local state and messages
4.Define timestamp
A timestamp is the current time of an event that a computer records. Through mechanisms, such as the Network Time Protocol, a
computer maintains accurate current time, calibrated to minute fractions of a second. Such precision makes it possible for
networked computers and applications to communicate effectively.
5. What is deadlock?
A Deadlock is a situation where a set of processes are blocked because each process is holding a resource and waiting for another
resource occupied by some other process. When this situation arises, it is known as Deadlock.
Design issues:
a).Distinguishing outdated REQUEST messages from current REQUEST messages
b) Determining which site has an outstanding request for the CS.
PART-B
11.b. Write a brief note on the key algorithmic challenges in distributed computing
There are also multiple challenges of distributed systems that determine the performance of the overall system.
Heterogeneity
Heterogeneity is one of the challenges of a distributed system that refers to differences in hardware, software, or network
configurations among nodes.
Scalability
Scalability is one of the challenges in distributed systems. As distributed systems grow in size and complexity, it becomes
increasingly difficult to maintain their performance and availability.
Openness
Openness in distributed systems refers to achieving a standard between different systems that use different standards, protocols,
and data formats. It is crucial to ensure that different systems can communicate and exchange data seamlessly without the need for
extensive manual intervention.
Transparency
Transparency refers to the level of abstraction present in the system to hide complex information from the user. It is essential to
ensure that failures are transparent to users and do not affect the overall system's performance. Systems with different hardware
and software configurations provide to be a challenge for Transparency. Security is also a concern to maintain transparency in
distributed systems.
Concurrency
Concurrency is the ability to process data parallelly on different nodes of the system. One of the primary challenges of
concurrency in distributed systems is the issue of race conditions.
Security
The distributed and heterogeneous nature of the distributed system makes security a major challenge for data processing systems.
The system must ensure confidentiality from unauthorized access as data is transmitted across multiple nodes.
Failure Handling
One of the primary challenges of failure handling in distributed systems is identifying and diagnosing failures as failure can occur
at any node. Logging mechanisms should be implemented to identify the failed nodes.
13.b. Explain how deadlock detection can achieve in distributed systems? Provide various models to carry out the same
Deadlock detection in Distributed systems
In a distributed system deadlock can neither be prevented nor avoided as the system is so vast that it is impossible to do so.
Therefore, only deadlock detection can be implemented. There are three approaches to detect deadlocks in distributed systems.
They are as follows:
Centralized approach – In the centralized approach, there is only one responsible resource to detect deadlock. The advantage of
this approach is that it is simple and easy to implement, while the drawbacks include excessive workload at one node, single-point
failure which in turns makes the system less reliable.
Distributed approach – In the distributed approach different nodes work together to detect deadlocks. No single point failure as
the workload is equally divided among all nodes. The speed of deadlock detection also increases.
Hierarchical approach – . In this approach, some selected nodes or clusters of nodes are responsible for deadlock detection and
these selected nodes are controlled by a single node.
There are three strategies for handling deadlocks:
Deadlock prevention:This is achieved either by having a process acquire all the needed resources simultaneously before it
begins executing or by preempting a process which holds the needed resource. Deadlock avoidance: A resource is granted to a
process if the resulting global system state is safe. This is impractical in distributed systems. Deadlock detection: This requires
examination of the status of process-resource interactions for presence of cyclic wait. Deadlock detection in distributed systems
seems to be the best approach to handle deadlocks in distributed systems.
14.b. Give byzantine agreement tree algorithm and illustrate with an example
Byzantine Fault Tolerance(BFT) is the feature of a distributed network to reach consensus(agreement on the same value) even
when some of the nodes in the network fail to respond or respond with incorrect information. The objective of a BFT mechanism
is to safeguard against the system failures by employing collective decision making(both – correct and faulty nodes) which aims
to reduce to influence of the faulty nodes. BFT is derived from Byzantine Generals’ Problem.
A practical Byzantine Fault Tolerant system can function on the condition that the maximum number of malicious nodes must
not be greater than or equal to one-third of all the nodes in the system. As the number of nodes increase, the system becomes
more secure.
BFT consensus rounds are broken into 4 phases(refer with the image below):
The client sends a request to the primary(leader) node.
The primary(leader) node broadcasts the request to the all the secondary(backup) nodes.
The nodes(primary and secondaries) perform the service requested and then send back a reply to the client.
The request is served successfully when the client receives ‘m+1’ replies from different nodes in the network with the same
result, where m is the maximum number of faulty nodes allowed.
15.a.i. What is cloud computing? Explain advantages and disadvantages of cloud computing
Cloud computing is the delivery of different services through the Internet, including data storage, servers, databases, networking,
and software. Cloud storage has grown increasingly popular among individuals who need larger storage space and for businesses
seeking an efficient off-site data back-up solution
Pros: Disaster Recovery (DR), Access your data anywhere, Low cost, Scalability, Security
Cons: Lack of total control, Difficult to migrate, Requires Internet, Security and privacy have been an issue. Fixed contracts can
be a problem
15.B. Discuss in detail about differences between IaaS, PaaS and SaaS
16.a. Show that the Ricart-Agarwala algorithm the critical section is accessed in increasing order of timestamp.
Ricart–Agrawala algorithm is an algorithm for mutual exclusion in a distributed system proposed by Glenn Ricart and Ashok
Agrawala. This algorithm is an extension and optimization of Lamport’s Distributed Mutual Exclusion Algorithm. Like Lamport’s
Algorithm, it also follows permission-based approach to ensure mutual exclusion. In this algorithm:
Two type of messages ( REQUEST and REPLY) are used and communication channels are assumed to follow FIFO
order.
A site send a REQUEST message to all other site to get their permission to enter the critical section.
A site send a REPLY message to another site to give its permission to enter the critical section.
A timestamp is given to each critical section request using Lamport’s logical clock.
Timestamp is used to determine priority of critical section requests. Smaller timestamp gets high priority over larger
timestamp. The execution of critical section request is always in the order of their timestamp.
Algorithm:
To enter Critical section:
When a site Si wants to enter the critical section, it send a timestamped REQUEST message to all other sites.
When a site Sj receives a REQUEST message from site Si, It sends a REPLY message to site Si if and only if
Site Sj is neither requesting nor currently executing the critical section.
In case Site Sj is requesting, the timestamp of Site Si‘s request is smaller than its own request.
To execute the critical section:
Site Si enters the critical section if it has received the REPLY message from all other sites.
To release the critical section:
Upon exiting site Si sends REPLY message to all the deferred requests.
16.b. Discuss the design issues and challenges in distributed systems from a system perspective
Design issues of the distributed system –
1. 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.
2. 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.
3. Scalability: The scalability of the system should remain efficient even with a significant increase in the number of users
and resources connected.
4. Security: The security of an information system has three components Confidentially, integrity, and availability.
Encryption protects shared resources and keeps sensitive information secrets when transmitted.
6. 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.
7. 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
8. 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