0% found this document useful (0 votes)
57 views4 pages

CS3551 Distributed Computing Question Bank

Distributed computing

Uploaded by

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

CS3551 Distributed Computing Question Bank

Distributed computing

Uploaded by

kumari2004ramesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

GRT INSTITUTE OF ENGINEERING AND

TECHNOLOGY

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

BE- Computer Science and Engineering

Anna University Regulation: 2021

CS3551 - DISTRIBUTED COMPUTING

III Year/V Semester

QUESTION BANK (2 Marks & 16 Marks)

UNIT -4 (CONSENSUS AND


RECOVERY)

Prepared By,

Mrs. SHANMUGAVALLI, AP/CSE

CS3551_DC
TWO MARKS

1. What do you mean by clock skew and clock drift?


• Clock skew – Instantaneous difference between the readings of any
two clocks is called clock skew. Skew occurs since computer clocks
like any others tends not be perfect at all times.
Clock drift – Clock drift occurs in crystal based clocks which counts time at different
rates and hence they diverge. The drift rate is the change in the offset between the
clock and a nominal perfect reference clock per unit of time measured by the
reference clock.
2. What do you mean by Coordinated Universal Time?

Coordinated Universal Time generally abbreviated as UTC is an


international standard for timekeeping. It is based on atomic time. UTC signals
are synchronized and broadcast regularly from land based radio stations and
satellites covering many parts of the world.
3. Define External Synchronization.

Generally it is necessary to synchronize the processes’ clocks Ci with


an authoritative external source of time. It is called as External
Synchronization. For a synchronization bound D>0, and for a source S of
UTC time, | S(t) – Ci(t)|<D for i=1,2..N for all real times t in I where I is the
time interval.
4. When an object is considered to be garbage?

An object is considered to be garbage if there are no longer any references


to it anywhere in the distributed system. The memory taken up by the object can
be reclaimedonce it is known to be garbage. The technique used here is
distributed garbage collection.

5. What do you meant by Distributed debugging?

In general, distributed systems are complex to debug.A special care


needs to be taken in establishing what occurred during the execution.
Consider an application with a variable xi(i=1,2..N) and the variable changes
as the program executes but it is always required to be within a value $ of

CS3551_DC
one other. In that case, relationship must be evaluated for values of the
variables that occur at the same time.
6. Define marker receiving rule.

Snapshot algorithm designed by Chandy and Lamport is used for


determining global states of distributed systems. This algorithm is defined
through two rules namely marker sending rule and marker receiving rule. Marker
receiving rule obligates a process that has not recorded its state to do so.
7. Define marker sending rule.

Snapshot algorithm designed by Chandy and Lamport is used for


determining global states of distributed systems. This algorithm is defined
through 2 rules namely marker sending rule and marker receiving rule. Marker
sending rule obligates processes to send a marker after they have recorded their
state ,but before they send any other messages.
8. Define the characteristics of serial equivalent transactions.

For any pair of transactions, it is possible to determine the order of


pairs of conflicting operations on objects accessed by both of them. Read and
write are the operations generally considered. For two transactions to be
serially equivalent it is necessary and sufficient that all pairs of conflicting
operations of the two transactions be executed in the same order at all of the
objects they both access.

9. What are the advantages of nested transactions?

The outermost transaction in a set of nested transactions is called top level


transaction. Transactions other than the top level transaction are called
subtransactions.
Advantages of nested transactions are:
• Subtransactions at one level may run concurrently with other
subtransactions at the same level in the hierarchy. This can allow
additional concurrency in a transaction.
• Subtransactions can commit or abort independently.
[Link] are the rules of committing nested transactions?
Rules for committing of nested transactions are:
• A transaction may commit or abort only after its child transactions have
completed.
• When a subtransaction completes, it makes an independent decision

CS3551_DC
either to commitprovisionally or to abort.
• When a parent aborts, all of its transactions are aborted.
When a subtransaction aborts, the parent can decide whether to abort or not

[Link] short notes on strict two phase locking

A simple mechanism of a serializing mechanism is the use of exclusive locks. Under


a strict execution regime, a transaction that needs to read or write an object must
be delayed until other transactions that wrote the same object have committed or
aborted. To enforce this rule, any locks applied during the progress of a transaction
are held until the transaction commits or aborts. This is called strict two-phase
locking. The presence of the locks prevents other transactions reading or writing
the objects.

[Link] the approach of two phase commit protocol.

Two phase commit protocol is designed to allow any participant to abort its part of
a transaction. In the first phase of the protocol, each participant votes for the
transaction to be committed or aborted. In the second phase of the protocol, every
participant in the transaction carries out the joint decision

16 marks
1. List the agreement statement that should be followed in synchronous system
with failure?
2. Illustrate briefly the two kinds of checkpoints for checkpoint algorithm?
[Link] the issues of failure recovery with an example?
[Link] the different types of failure in distributed systems?

CS3551_DC

Common questions

Powered by AI

The Chandy and Lamport snapshot algorithm is integral for determining the global states of distributed systems. Its importance lies in providing a consistent snapshot of the system's state, which is necessary for system reliability and recovering from faults. The algorithm uses two primary rules: the marker sending rule, which obligates processes to send a marker after recording their state but before sending other messages, and the marker receiving rule, which mandates processes not yet recorded to do so upon receiving a marker .

Nested transactions offer several advantages, particularly in concurrency and fault tolerance. Subtransactions within a nested transaction structure can execute concurrently, which increases the overall concurrency of the system. Additionally, subtransactions can independently commit or abort, which enhances fault tolerance, as the failure of a subtransaction does not necessitate the failure of the entire transaction, and the parent transaction can decide how to proceed .

An object in a distributed system is considered garbage if there are no longer any references to it within the system. Once identified as garbage, the memory it occupies can be reclaimed. This process is known as distributed garbage collection .

The two-phase commit protocol is designed to achieve consensus on committing or aborting a transaction across distributed systems. In the first phase, all participating entities vote on whether to commit or abort the transaction. In the second phase, a consensus decision is enforced; all participants either commit or abort the transaction based on the collective vote. This protocol ensures consistency and agreement across distributed transactions, even in the presence of failures .

Coordinated Universal Time (UTC) functions as an international standard for timekeeping that is based on atomic time. UTC signals are both synchronized and broadcasted regularly via land-based radio stations and satellites covering many areas of the world, ensuring a consistent reference time for synchronization across distributed systems .

External synchronization involves aligning the clocks of processes within a distributed system to an authoritative external time source, such as UTC. This is crucial because it ensures processes within the system operate under a consistent time framework. The synchronization is within a bound D>0, such that the time difference between the system clock Ci and the source S of UTC time remains less than D for all real times within a given interval .

Clock skew refers to the instantaneous difference between the readings of two clocks. It arises because computer clocks, like all clocks, are not perfect at all times. Clock drift occurs when clocks deviate from a reference clock due to counting time at different rates — specifically common in crystal-based clocks. The drift rate is defined as the change in the offset between the clock and an ideal reference clock per unit of time. These issues impact system timekeeping by causing inconsistencies and inaccuracies in time-based operations .

Checkpoints play a crucial role in failure recovery by providing a saved state of a system from which recovery can be initiated following a failure. They allow a system to revert to a known good state, thereby minimizing data loss and recovery time. The checkpoint algorithm typically involves saving the state of processes and messages at specific intervals or conditions, enabling the system to restore operations to the point of the last checkpoint in the event of a crash or error .

Serially equivalent transactions in distributed systems require that, for any pair of transactions, the order of conflicting operations (e.g., read and write) on objects accessed by both transactions can be determined and is consistent across all accesses. This ensures that the results of executing transactions concurrently are the same as if the transactions were executed serially, thereby preserving data integrity and consistency .

Strict two-phase locking protocols ensure transaction serialization by requiring a transaction to delay operations until it has exclusive locks on required objects. Locks obtained during a transaction are held until it commits or aborts, ensuring that no two transactions can modify the same data concurrently, which prevents conflicts and ensures consistent data state. However, this also implies potential wait times for transactions needing access to locked resources, possibly affecting system throughput .

You might also like