0% found this document useful (0 votes)
20 views3 pages

DC

The document discusses several key concepts in distributed computing: 1) In-transit messages refer to messages being transmitted between nodes, while orphan messages were sent but not received due to failures. Distributed systems use acknowledgements to prevent orphan messages. 2) Byzantine agreement algorithms ensure all nodes agree on a decision, even when some provide conflicting information, which is important for systems like blockchains and databases. 3) Consensus problems involve nodes reaching agreement despite failures or errors, which is fundamental for distributed databases to ensure consistency. 4) Wait-for graphs represent transaction dependencies to detect and resolve deadlocks in distributed systems.

Uploaded by

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

DC

The document discusses several key concepts in distributed computing: 1) In-transit messages refer to messages being transmitted between nodes, while orphan messages were sent but not received due to failures. Distributed systems use acknowledgements to prevent orphan messages. 2) Byzantine agreement algorithms ensure all nodes agree on a decision, even when some provide conflicting information, which is important for systems like blockchains and databases. 3) Consensus problems involve nodes reaching agreement despite failures or errors, which is fundamental for distributed databases to ensure consistency. 4) Wait-for graphs represent transaction dependencies to detect and resolve deadlocks in distributed systems.

Uploaded by

Amritesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

In distributed computing, an "in transit" message refers to a message that is currently being
transmitted from one node to another over a network or communication channel. This means that the
message has left its sender node but has not yet reached its intended recipient node.

On the other hand, an "orphan message" refers to a message that has been sent from a node but has
not been received by any other node in the system. This can happen due to various reasons, such as a
network failure or a node failure. Orphan messages can lead to inconsistencies in the system and can
cause data loss or corruption.

To avoid orphan messages, distributed computing systems often use message queuing or
acknowledgement mechanisms to ensure that messages are successfully delivered to their intended
recipients.

2. Byzantine agreement is a problem in distributed computing that deals with how to achieve consensus
or agreement among a group of distributed nodes, even when some nodes may be faulty or behave
maliciously. This problem is named after the Byzantine generals problem, a thought experiment where a
group of generals must coordinate their attack on an enemy city, despite the possibility of traitors in
their midst.

In distributed computing, Byzantine agreement algorithms aim to ensure that all nodes agree on a single
decision or value, even when some nodes may provide conflicting information. This is important in many
distributed systems where nodes need to coordinate and make decisions together, such as in blockchain
networks or distributed databases.

A Byzantine agreement algorithm must be fault-tolerant, meaning it can withstand the failure or
malicious behavior of some nodes, and must also be able to detect and handle conflicting information
provided by faulty or malicious nodes. There are several Byzantine agreement algorithms developed for
different types of distributed systems, such as the Practical Byzantine Fault Tolerance (PBFT) algorithm
for consensus in blockchain networks, and the Byzantine Generals Algorithm (BGA) for distributed
databases.

3. In distributed computing, a consensus problem refers to the problem of reaching a shared agreement
or decision among a group of distributed nodes, despite the possibility of node failures, network delays,
and other types of errors or uncertainties.

Consensus is a fundamental problem in many distributed systems, as nodes need to coordinate and
agree on decisions in order to achieve a common goal. For example, in a distributed database system,
nodes need to agree on the order and validity of transactions to ensure data consistency and integrity.

4. In distributed computing, a wait-for graph is a directed graph that represents dependencies among
transactions or processes in a distributed system.

Each node in the graph represents a transaction or process, and each directed edge from node A to node
B indicates that transaction A is waiting for transaction B to complete before it can proceed.

Wait-for graphs are commonly used in distributed systems to detect and resolve deadlocks, which can
occur when two or more transactions are waiting for each other to complete, causing a circular
dependency that prevents any of them from progressing.
By analyzing the wait-for graph, a distributed system can detect cycles or other forms of dependencies
among transactions, and take appropriate actions to resolve deadlocks, such as rolling back one or more
transactions or releasing resources held by blocked transactions.

5. Checkpointing and rollback recovery protocols are techniques used in distributed systems to ensure
fault tolerance and to recover from failures. In a distributed system, a failure of a node or process can
cause the entire system to fail or become unavailable. Checkpointing and rollback recovery protocols aim
to minimize the impact of such failures and to restore the system to a consistent state.

Checkpointing is the process of periodically saving the current state of a process or node in a distributed
system. A checkpoint contains the process's current state, including its data and execution state.
Checkpoints can be saved to a stable storage medium, such as disk or non-volatile memory, which is not
affected by a process failure. Checkpoints can be taken periodically or when significant events occur,
such as when a critical operation completes or when a large amount of data is processed.

Rollback recovery protocols are used to recover a distributed system after a failure by rolling back to a
previous checkpoint and replaying the operations that occurred after that checkpoint. Rollback recovery
protocols involve three steps: checkpointing, failure detection, and recovery. When a failure is detected,
the system rolls back to the last checkpoint and re-executes the operations that occurred after that
checkpoint to bring the system back to its last consistent state.

6. In the Ricart-Agarwala algorithm, each process maintains a queue of requests for a shared resource.
Before a process can access the shared resource, it must first request permission from all other
processes that may also need access to the same resource. The process sends a request message to all
other processes and waits for their replies. Each process replies to the request message with a message
indicating whether it can grant access to the shared resource or not. A process can grant access to the
shared resource only if it is not currently using the resource and has not requested access to the
resource earlier than the requesting process.

The requesting process waits until it receives a reply from all other processes. If a process has not replied
within a specified timeout period, the requesting process assumes that the process is unavailable and
continues processing. If all processes grant permission, the requesting process enters the critical section
and accesses the shared resource. After the process has finished using the shared resource, it releases
the resource and sends release messages to all other processes.

The Ricart-Agarwala algorithm ensures mutual exclusion by ensuring that only one process can enter the
critical section at a time. It also ensures that no process is stuck waiting indefinitely for permission to
access the shared resource. The algorithm is relatively efficient since it only requires each process to
send and receive messages from other processes that are trying to access the shared resource.

The Ricart-Agarwala algorithm is widely used in distributed systems for mutual exclusion, especially in
systems where there are a large number of processes and shared resources. It is also used in
combination with other algorithms to provide higher levels of reliability and fault tolerance in distributed
systems.

7. Lamport's bakery algorithm is a mutual exclusion algorithm that allows multiple processes to access a
shared resource one at a time without interference. It was proposed by computer scientist Leslie
Lamport in 1974 and is used in many operating systems and distributed systems.
In the Lamport's bakery algorithm, each process is assigned a number, and the process with the smallest
number has the highest priority for accessing the shared resource. When a process wants to access the
shared resource, it enters a queue and takes a number that is larger than any number currently in the
queue. The process then waits until all processes with lower numbers have accessed the resource before
it can access the resource itself.

The Lamport's bakery algorithm is a fair algorithm, meaning that all processes eventually get access to
the shared resource. It also satisfies the mutual exclusion property, ensuring that only one process is in
the critical section at a time. The algorithm is relatively simple to implement and is widely used in
operating systems, distributed systems, and real-time systems.

However, the algorithm may suffer from starvation if a process with a higher priority never gets a chance
to access the resource. To avoid this, the algorithm can be modified by implementing a timeout
mechanism or by randomly selecting the next process to access the resource.

You might also like