DC 2 QA Unit IV
DC 2 QA Unit IV
DC 2 QA Unit IV
UNIT IV
1. What is meant by hardware and software clock?
Clock devices can be programmed to generate interrupts at regular intervals in orders that,
for example, time slicing can be implemented. The operating system reads the node’s
hardware clock value, H(t) , scales it and adds an offset so as to produce software clock C
(t)=αHi(t)+β that approximately measures real ,physical time t for process pi.
2. What is clock resolution?
Note that successive events will correspond to different timestamps only if the clock
resolution-the period between updates of the clock-value-is smaller than the time interval
betw4een successive events. The rate at which events occur depends on such factors as the
length of the processor instruction cycle.
3. What is clock drift?
Clock drift, which means that they count time at different rates and so diverge. The
underling oscillators are subject to physical variations, with the consequence that their
frequencies of oscillation differ. Moreover ,even the same clock’s frequency varies with
temperature. Designs exist that attempt to compensate for this variation, but they cannot
eliminate it. A clock’s drift rate is the change in the offset (difference in reading) between
the clock and a nominal perfect reference clock per unit of time measured by the reference
clock.
4. What is IAT?
Computer clocks can be synchronized to external sources of highly accurate time. The most
accurate physical clocks use atomic oscillators, whose drift rate is about one part in 1013.the
most accurate physical clocks use atomic oscillators, whose drift rate is about one part in
1013. The output of these atomic clocks is used as the standard for elapsed real a time,
known as International Atomic Time.
5. What is CUT?
Coordinated Universal Time-abbreviated as UTC (From the French equivalent)-is as
international standard for timekeeping. It is based on atomic time, but a so-called ‘leap
second’ is inserted-or, more rarely, deleted-occasionally to keep it in step with astronomical
time.
6. What is meant by external synchronization?
In order to know at what time of day events occur at the processes in our distributed system
–it is necessary to synchronize the processes’ clocks, C , with an authoritative, external
source of time. This is external synchronization.
We define these two modes of synchronization more closely as follows, over an interval of
real time I:
For a synchronization bound D>0,|Ci(t)-Cj(t)|<D for i=0,1,2,… N and for a source S of
UTC time, |S(t)-Ci(t)|<D,for i=1,2,.. and for all real times t in I.
The clocks Ci are accurate to within the bound D.
VC4: when pi receives a timestamp t, it sets Vi[ j ] := max(Vi[ j ] , t[ j ]) for j=1..N (merge
operation)
16. What do you meant by distributed garbage
An object is considered to be garbage if there are no longer any reference to it anywhere in
the distributed system. The memory taken up by that object can be reclaimed once it is
known as to be garbage.
17. Define Global History
Let us return to our general system p of N processes pi(i=1,2,3,…..N)
Here a series of events occurs at each process, and that we may characterize the execution of
each process by its history
18. What is meant by cut?
Consider the events occurring at processes p1 and p2 shown in figure
• synchronous
• timeout T = 2Ttransmitting (max transmission delay) + Tprocessing (max processing delay)
Three types of messages
a. Election: announce an election
b. Answer: in response to Election
c. Coordinator: announce the identity of the elected process
27. What are the types of ordering in multicast
Three types of message ordering
FIFO (First-in, first-out) ordering: if a correct process delivers a message before
another, every correct process will deliver the first message before the other
Casual ordering: any correct process that delivers the second message will deliver the
previous message first
Total ordering: if a correct process delivers a message before another, any other correct
process that delivers the second message will deliver the first message first
28. Define Consensus
Consensus more precisely and relates it to three related Problems of agreement.For processes to
agree on a value (consensus) after one or more of the processes has proposed what that value
should be Covered topics: byzantine generals, interactive consistency, totally ordered
multicast
• The byzantine generals problem: a decision whether multiple armies should attack or retreat,
assuming that united action will be more successful than some attacking and some retreating
• Another example might be space ship controllers deciding whether to proceed or abort. Failure
handling during consensus is a key concern
29. What are the requirements of interactive consistency?
Three requirements of a consensus algorithm
Termination: Eventually every correct process sets its decision variable
Agreement: The decision value of all correct processes is the same: if pi and pj are
correct and have entered the decided state, then di=dj for all (i,j=1,2, …, N)
Integrity: If the correct processes all proposed the same value, then any correct process
in the decided state has chosen that value
30. What are the requirements of consensus algorithms
The requirements of a consensus algorithms are that are following conditions should hold
for every execution of it:
Termination
Agreement
Integrity
To capture the happened-before relation , processes update their logical clocks and
transmit the values of their logical clocks in messages as follows:
LC1: Li is incremented before each event is issued at process pi :
Li := Li + 1.
LC2: (a) When a process pi sends a message m, it piggybacks on m the value t = Li .
(b) On receiving (m, t), a process pj computes Lj := max(Lj, t) and then
applies LC1 before timestamping the event receive(m).
A ring-based algorithm
2. When a participant receives a canCommit? request it replies with its vote (Yes or No) to
the coordinator. Before voting Yes, it prepares to commit by saving objects in permanent
storage. If the vote is No, the participant aborts immediately.
4. Participants that voted Yes are waiting for a doCommit or doAbort request from the
coordinator. When a participant receives one of these messages it acts accordingly and, in
the case of commit, makes a haveCommitted call as
confirmation to the coordinator.
The election was started by process 17. The highest process identifier encountered
so far is 24. Participant processes are shown in a darker tint.
The operation of the algorithm is shown in above figure. There are four processes, p1 –
p4 . Process p1 detects the failure of the coordinator p4 and announces an election (stage 1 in
the figure). On receiving an election message from p1 , processes p2 and p3 send answer
messages to p1 and begin their own elections; p3 sends an answer message to p2 , but p3
receives no answer message from the failed process p4 (stage 2). It therefore decides that it is
the coordinator. But before it can send out the coordinator message, it too fails (stage 3). When
p1 ’s timeout period T expires (which we assume occurs before p2 ’s timeout expires), it
deduces the absence of a coordinator message and begins another election. Eventually, p2 is
elected coordinator (stage 4).
The essential problem is the absence of global time. If all processes had perfectly
synchronized clocks, then we could agree on a time at which each process would record its
state – the result would be an actual global state of the system. From the collection of
process states we could tell, for example, whether the processes were deadlocked. But we
cannot achieve perfect clock synchronization, so this method is not available to us.
Cuts