text
stringlengths
2
132k
source
dict
delivery of messages con-forms with their causal order relations. Two messages which are not causally related, are said to be concurrent. The causal order broadcast does not de-fine any delivery constraints on concurrent messages. 4.6.1 Specification The causal order broadcast specification studied here guarantees the ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
whether the message has already been delivered (line 21 onwards). Following this, all messages inside the received Past set are checked with the messages which were delivered. Any messages not yet delivered will be delivered immediately (line 24). This is why in line 21, all messages are checked to determine whether th...
{ "page_id": null, "source": 7318, "title": "from dpo" }
the Past set. This way, the size of the Past is no longer indefinite, but rather decreases as all processes acknowledge delivery. 76 Figure 4.11: Garbage collection algorithm for the Past set 77 This mechanism keeps a mapping between every message and the processes which acknowledged it ( Ack ). As soon as a message is...
{ "page_id": null, "source": 7318, "title": "from dpo" }
Dict module. It was mentioned that messages should be delivered from the Past set in the same order in which they were added. This was achieved by having 78 every process keeping a counter of the messages entered in its own Past set. Moreover, when a message is to be added to this set, the counter is added together wit...
{ "page_id": null, "source": 7318, "title": "from dpo" }
itself. This relieves some of the memory requirement of the algorithm. Moreover, as soon as a message can be removed from the Past set, its equivalent set in the Ack set is removed as well. The problem of the Past set has been tackled with the use of the garbage collection mechanism outlined. However, the Delivered set...
{ "page_id": null, "source": 7318, "title": "from dpo" }
reliable broadcast specification guarantees that all messages delivered, obey the causal order relation. Established algorithms for each specification, were studied and implemented in Erlang, using the implementation framework developed for this project. Insights about the implementation, together with tweaks and optim...
{ "page_id": null, "source": 7318, "title": "from dpo" }
to distinguish, whether a propose is intended for one consensus instance or the other. For this reason, in practice, all calls and callbacks to consensus have another argument - the consensus identifier. This argument will always come first in the argument list. Hence if a process needs to propose to a three different ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
Moreover, the floodset algorithm assumes an upperbound on the number of failures and does not utilize a failure detector. Despite all these problems, the floodset algorithm still sets the basis for the flooding consen-sus algorithm implemented here. For this reason, it will be briefly outlined. Following this, the chan...
{ "page_id": null, "source": 7318, "title": "from dpo" }
the waiting processes would not know whether these can proceed or wait to receive something from the crashed process. Figure 5.1: Invalidity of Reliable Broadcast algorithms for imple-mentation of consensus protocols This problem is illustrated in figure 5.1. Here the most basic case, with just two processes is conside...
{ "page_id": null, "source": 7318, "title": "from dpo" }
other hand, process P3,detects that that P1 failed (Point A) before receiving its proposal. Moreover, if this proposal will be received, it will be ignored, and hence P3 can make a decision based on its current proposal set. Given that it has not seen proposals from process P1, its proposal set will be different than t...
{ "page_id": null, "source": 7318, "title": "from dpo" }
maximum number of failures (referred to as f ). Func is the decision function which will be applied to set of proposals, when all proposals have been gathered. These two parameters are held in the state, together with other data ele-ments: Proposals set with the proposed values from the other processes, the current Rou...
{ "page_id": null, "source": 7318, "title": "from dpo" }
the floodset algorithm with one process failure Figure 5.4 gives a run of the floodset algorithm between three processes and with f = 1. Processes P1 and P2 broadcast successfully, however, process P3 only sends its proposals to P2 (Point A). Hence at the end of round 1, the processes do not have identical proposal set...
{ "page_id": null, "source": 7318, "title": "from dpo" }
is also an array with the round numbers as indexes and ele-ments being the proposals received for the corresponding round. When a value is proposed (lines 28 to 30), the value is added to the first Proposals set and broadcast. Note that when broadcasting (line 30), the message consists of three elements: an atom identi...
{ "page_id": null, "source": 7318, "title": "from dpo" }
eventually terminating it. If for the last two rounds, no failure is detected (ie there are two successive equal sets of PID’s, in the Correct this round structure) then a decision can be made (lines 38-41). The decision is made by applying the decision function Func (which was passed as an argument to init() ) on the ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
out for the sake of simplicity). In the second round, these processes receive the decision and hence decide immediately. Note that it is not possible for two processes to decided differently. This is because for a process to decide, there must be two consecutive rounds without detecting a failure. Moreover, at the end ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
care to free memory it previously occupied. Note that such a technique could not be done with the reliable broadcast implementations, because all algorithms require data structures whose con-tent was required to guarantee correctness. In this case however, just storing the decision (or a flag indicating that the consen...
{ "page_id": null, "source": 7318, "title": "from dpo" }
Algorithm The previous section outlined a valid algorithm for Regular Consensus . Here another algorithms is presented, which despite having different characteris-tics, still satisfies the Regular Consensus specification. The Hierarchical consensus algorithm, exchanges less messages than the flooding algorithm. However...
{ "page_id": null, "source": 7318, "title": "from dpo" }
with the round number as index, and a boolean flag as element, indicating whether the proposal has been received from the corresponding round leader. At every round, the process whose rank is equal to the round number (line 31) is the round leader. The round progresses as soon as the leader process has a value to propo...
{ "page_id": null, "source": 7318, "title": "from dpo" }
broadcasting its proposal but crashes shortly afterwards. Note that this proposal actually reaches P3 but not P2 (point A). At this point, P3 adopts P1 proposal and moves on to round 2, but does not callback the decide() event. In round 1, process P2 detects that P1 crashed, and so can move on to round 2 as well. In ro...
{ "page_id": null, "source": 7318, "title": "from dpo" }
that if the round leader does not yet have a proposed value, then the algorithm will wait for that process to propose() . 5.4.4.1 Erlang Implementation The hierarchical consensus algorithm implementation uses the Erlang mod-ules outlined so far - the main ones being the sets module for the Detected 96 set and array mod...
{ "page_id": null, "source": 7318, "title": "from dpo" }
the decision from the current round leader or else detects that this has crashed - either conditions are guaranteed by the eventual delivery of links and the strong completeness property of the failure detector. At this point it moves on to the following round and hence eventually the process will become a leader and t...
{ "page_id": null, "source": 7318, "title": "from dpo" }
exists a time, at which all correct processes decide some value. • Validity : A decided value must be a proposed value. • Integrity : Processes decide only once. • Uniform Agreement : All processes agree on the same value. 5.5.3 Algorithm The listing in figure ?? , gives a uniform flooding consensus algorithm. This alg...
{ "page_id": null, "source": 7318, "title": "from dpo" }
failure detector does not detect as having failed. Moreover, similar to the floodset algorithm, an array of sets (Delivered ) is kept to store the PID’s of processes from whom the proposals were received at every round (lines 29-31). A process moves on to the following round when it determines that it has received a pr...
{ "page_id": null, "source": 7318, "title": "from dpo" }
memory optimisation, it is noted that the algorithm internally keeps a Delivered set with the PID’s of processes at every round. However, as soon as a process moves on to the following round, it would no longer need this set, and hence could be discarded. Hence, at the beginning of every round, the entry for the Delive...
{ "page_id": null, "source": 7318, "title": "from dpo" }
the violation of the uniform agreement property due to an inaccurate failure detector. Initially, processes P1 and P2 incorrectly detect one another as having crashed, and send kill messages, which take very long to be delivered (shown by the dashed lines). This causes both processes to move on to the following rounds ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
order. Note that such a protocol would be stronger than the causal order specification because it guarantees ordering amongst all messages, not just those which are causally related. Given such a guarantee, this protocol can be very useful when certain non-commutative operations are to be carried out - given a total or...
{ "page_id": null, "source": 7318, "title": "from dpo" }
all correct processes in the system. • Integrity : For any message m, every process delivers m at most once, and only if it was previously broadcast. • Agreement : All correct processes deliver the same set of broadcast messages. # 5.7 Algorithm The listing in figure 5.13 gives a regular consensus based algorithm for t...
{ "page_id": null, "source": 7318, "title": "from dpo" }
current round will eventually be made. At this point, the necessity of executing a consensus might be unclear since messages are being broadcast reliably. However, it must be noted that these messages might arrive in different orders at different processes. Hence these must be ordered in some way or another. This canno...
{ "page_id": null, "source": 7318, "title": "from dpo" }
propose it as a value for consensus. Processes P1 and P2 propose P1’s message since these deliver this message first, whereas process P3 proposes its own message. At this point, the pro-cesses execute a regular consensus algorithm. Note that processes deliver reliable broadcast messages, whilst executing their consensu...
{ "page_id": null, "source": 7318, "title": "from dpo" }
use a consensus abstraction to determine the set of messages to deliver at every round, and then use a deterministic function to deliver all messages in this set in the same order. This also guarantees agreement amongst processes on the messages delivered. Validity is guaranteed because every message is first dissemina...
{ "page_id": null, "source": 7318, "title": "from dpo" }
in deter-mining whether all processes can carry out a particular operation, or not. If so, all processes would carry out the operation and are said to have com-mitted. If at least on process cannot commit, then the operation should be aborted by all processes. This problem is typically encountered in a distributed data...
{ "page_id": null, "source": 7318, "title": "from dpo" }
and vice versa. • Abort Validity : The operation should be aborted only if a process cannot commit or a process crashes. • Commit Validity : The operation can be committed only if all pro-cesses agree to commit and no process crashes. • Termination : All correct processes decide on whether to commit or abort. # 6.4 Syn...
{ "page_id": null, "source": 7318, "title": "from dpo" }
a query to commit message is broadcast to all cohorts. This message indicates that a commit operation is underway and that the cohorts should check whether the commit operation can take place locally or not. The cohorts should then reply with a reply yes or a reply no message indicating that the cohort can carry out th...
{ "page_id": null, "source": 7318, "title": "from dpo" }
commit), then a reply yes message is sent, otherwise a reply no message is sent (lines 28-34). In the second phase, the algorithm callbacks decide(1) or decide(0), de-pending on whether a commit or abort messages were received from the coordinator, respectively. Figure 6.3 gives a run of the two phase commit algorithm....
{ "page_id": null, "source": 7318, "title": "from dpo" }
to resolve the issue. If this does not happen, however, the cohorts will remain waiting, whilst possibly holding resources for ever. It should also be noted, that if the best effort broadcast protocol is replaced by a reliable broadcast protocol, then there might still be cases where the cohorts remain blocked. In part...
{ "page_id": null, "source": 7318, "title": "from dpo" }
the two phase commit 116 algorithm which uses regular reliable broadcast instead of best effort broad-cast . Such a variant would still be incorrect, even if there are strictly defined timing boundaries for the maximum time taken for the reply from the coor-dinator to be received. Note that if the coordinator fails in ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
other hand, if processes do not receive this prepare message, their default action will be to abort the operation. The coordinator waits to receive acknowledges from all processes, and when this happens it moves to the third phase and sends out the commit message (lines 34-35). Note that the coordinator will send abort...
{ "page_id": null, "source": 7318, "title": "from dpo" }
not re-ceived from the coordinator within some time boundary). In case the cohort timeout while in phase 1 (no prepare or abort message is received from the coordinator), then the operation will be aborted by all cohorts. Conversely, if the cohorts timeout while in phase 2 (no commit or abort message is received from t...
{ "page_id": null, "source": 7318, "title": "from dpo" }
a message to the local gen server with the value of the phase in which it was triggered. The handler of this cast, would check whether the internal phase is the same as that received in the cast, and if so then the particular timeout action for that phase is carried out. Otherwise, no action is taken. 119 6.4.2.2 Appli...
{ "page_id": null, "source": 7318, "title": "from dpo" }
outlined. Similar to the three phase commit algorithm, this algorithm is also non-blocking. The idea behind the algorithm is very similar to a two phase commit algo-rithm, which utilizes a regular reliable broadcast for the first phase and a uniform broadcast for the second phase. This idea has already been outlined in...
{ "page_id": null, "source": 7318, "title": "from dpo" }
to achieve a decision. In order to resolve this issue, it should be ensured that all cohorts have a value to propose (indicating whether they can commit or not). This can be done by having cohorts broadcast this proposal to one another before actually proposing it to the uniform consensus abstraction. This way, ev-ery ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
The listing in figure 6.7 gives the coordinator role in this algorithm. Note that this listing also gives the state definition and initialisation of for the whole algorithm. Internally the algorithm keeps two sets, Voted and Correct ,both used by the cohorts. It also keeps a flag indicating whether the cohort has propo...
{ "page_id": null, "source": 7318, "title": "from dpo" }
a proposal to commit (with value 1) is received from all correct processes, and no process has been detected to have failed, then the process will de-duce that the operation can be committed, and propose 1 to the uniform consensus abstraction. Otherwise, if some process is detected to have failed, then it will propose ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
non-blocking atomic commit specification. It satisfies the properties of the non-blocking atomic commit specification and guarantees that either all processes commit or abort the operation. It guarantees uniform agreement due to the underlying use of the uniform consensus abstraction.It guarantees abort-validity becaus...
{ "page_id": null, "source": 7318, "title": "from dpo" }
commit algorithm was studied, and its problems were outlined. Following this the three phase commit algo-rithms was also investigated. Finally, an asynchronous algorithm for Atomic Commit was studied. This algorithm is based on the uniform consensus specification. These algorithms were implemented using the implementat...
{ "page_id": null, "source": 7318, "title": "from dpo" }
system and then test at higher levels of abstraction. This approach was taken, so as to be able to carry out the testing of the system in parallel with the coding of the algorithms. In the context of this project, three levels of testing were performed. These are: 1. Function Testing : The testing of individual functio...
{ "page_id": null, "source": 7318, "title": "from dpo" }
) was used. 128 This is a tool which automatically generates a large number of testcases, and ensures that the function obeys a particular property. For example, an eqc gen with a property for testing the conversion of a list to a set, might look like: ?FORALL({Values}), {list(char())}, sets:from_list(Values) == sets:f...
{ "page_id": null, "source": 7318, "title": "from dpo" }
function does not trigger an exception for all the Values generated by this Quickcheck tool. This way, all tests will still run, and if an exception is triggered, it will be reported. Throughout testing, another tool which was widely used was the Erlang debugger. The Erlang development suite comes with a fully flushed ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
definition and initial states are given below: -record(state, {correct}). ... initial_state() -> #state{correct=node_utils:get_all_peers() }. This code will initialise the first Correct set as having a list with the PID’s of all nodes. Following this, the state transitions are defined: next_state(S, _, {call, r_rb, bro...
{ "page_id": null, "source": 7318, "title": "from dpo" }
function definition is given below: command{S)-> oneof( [{call, r_rb, broadcast, [random_string()]}, {call, r_rb, crash, [random_element(S#state.correct)]}]). The command function indicates that the issued test commands should be one of those specified in the list passed to the oneof function. This list specifies the t...
{ "page_id": null, "source": 7318, "title": "from dpo" }
distributed system) registered names. Hence, following this localized approach, the system was tested in real dis-tributed environment. The deployment in a distributed system, makes the system prone to different forms of failures which are not present in a localised environment. Throughout testing, since crash-failures...
{ "page_id": null, "source": 7318, "title": "from dpo" }
by remote processes will all be sent to the shell which started them (which is referred to as the ”monitor shell”). When outputting debug data, every process precedes this data with the name of the node from were it is originating, so that one can keep track from where the debug data on the monitor shell, is originatin...
{ "page_id": null, "source": 7318, "title": "from dpo" }
root directory with no subdirectories. Files can be created, accessed and deleted from within this directory and all these changes should be reflected on all participating nodes. A filesystem, typically handles a number of calls which are issued by the operating system. The filesystem implemented here will only handle ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
ensure that all nodes keep the same version of the file. So as to ensure this, it is assumed that the most recent version of the file should be kept. Note that though the clocks of the nodes are not assumed to be synchronized, this would still ensure that the same version of the file is kept by all nodes. In the rare c...
{ "page_id": null, "source": 7318, "title": "from dpo" }
occurs whiilst a read is taking place, this could cause the read to return inconsistent data (data from two versions). For this reason, though the operating system may issue concurrent calls, these calls are serialized by the filesystem and handled one after the other. This would ensure that one read, would always retu...
{ "page_id": null, "source": 7318, "title": "from dpo" }
process has to be written in C, not in Erlang. However, Erlang has a mechanism by which to interface to external pro-grams. This is called the Ports Interface , which allows data to be sent and received to and from an external program. The external application needs to encode this data in a special way (which is done b...
{ "page_id": null, "source": 7318, "title": "from dpo" }
this filesystem, such updates can be reduced to deleting a file and writing data to a file. Both the deletion and writing data to a local file, can be handled from within an Erlang shell, through the use of the files OTP module. In reality, not all file system operations require interaction with other nodes. Some of th...
{ "page_id": null, "source": 7318, "title": "from dpo" }
In fact, these can invoke the usual calls for carrying these operations locally. As has been mentioned, the write call needs to be handled by some form of reliable broadcast. It could be noted, that unless a total ordering is ensured, different nodes will possibly end with different versions of the file, after that all...
{ "page_id": null, "source": 7318, "title": "from dpo" }
write the data, at the specified offest into the requested file. The last two callbacks, can commit and decide deal with the consensus based commit issued to determine whether a file can be deleted or not. The handler of the can commit callback, should check whether the file is open by the local node and return a boole...
{ "page_id": null, "source": 7318, "title": "from dpo" }
extensively. The solutions to these problems, however, are rather intricate and require a deep understanding of the difficulties which arise when attempting to give solutions to these problems. Primarily, alterna-tive approached to solving distributed agreement problems are analysed. 141 This project pinpoints these pr...
{ "page_id": null, "source": 7318, "title": "from dpo" }
This relieves having to devise the distributed agreement algorithms themselves, but rather the programmer focuses on writing interfacing codes (or wrappers) for triggering events in the existing algorithms and handling events these callback. 8.2.3 Structured Code This suite of distributed protocols also provides fault ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
built from scratch, the programmer would have needed to understand these problems in their totality, and make sure that all effects are catered for. However, with this suite of algorithms, it suffices for the programmer to simply know the basic semantics of the algorithm and its interface, in order to produce a correct...
{ "page_id": null, "source": 7318, "title": "from dpo" }
that all interactions with other node, is made through these abstractions, then the final code will be much easier to write, whilst providing the correctness ensured by the underlying algorithm. # 8.3 Assessing the Implementation Framework In this project, an implementation framework was devised - in which all agreemen...
{ "page_id": null, "source": 7318, "title": "from dpo" }
provided part of the implementation semantics required, it also is a very commonly used and well documented Erlang behaviour. Hence this makes the code more structured and more maintainable. # 8.4 Evaluating the usage of Erlang Having implementing this suite of algorithms in Erlang, the applicability of Erlang can be e...
{ "page_id": null, "source": 7318, "title": "from dpo" }
code. It is claimed that this helps tracking down bugs, because only a single action could have assigned a value to a variable . However, this particular benefits was not really felt. Furthermore, this made the code rather obscure at time. For example, figure 8.1a gives a line taken from the flooding consensus algorith...
{ "page_id": null, "source": 7318, "title": "from dpo" }
order functions. It also provides theory-like abstractions for distributed communication such as simple communication primitives, and process labelling. All this reduces the leap required from theory to practice. Nevertheless, in theory usually one tends to prioritize correctness before performance requirements concern...
{ "page_id": null, "source": 7318, "title": "from dpo" }
messages exchanges of the flooding consensus algorithm by half, however the decision is imposed by one of the participants without considering all other proposals first. The algorithm for the total order broadcast uses an existing regular consen-sus algorithm and a regular reliable broadcast algorithm. Thus, consensus-...
{ "page_id": null, "source": 7318, "title": "from dpo" }
8.5.2 Memory Requirement In the presentation of the algorithms given here, a lot of concern was ex-pressed regarding the memory requirement of certain algorithms. It is noted, that in the implementation of these algorithms, as soon as some structure is no longer needed, it is removed from the recursive state (held by t...
{ "page_id": null, "source": 7318, "title": "from dpo" }
be solved to its totality, however a possible solution is mentioned as part of the future work. # 8.6 Assessing the failure detector implemented In this project, we chose to work on top of Erlangs native failure detection mechanism, to build a perfect failure detector. The field of failure detectors is a research area ...
{ "page_id": null, "source": 7318, "title": "from dpo" }
be allowed similar to having message reordering, a failure detector can always be fast enough to detect a failure, before all pending messages are received. However such a perfect detector is not truly perfect. There could be cases where it could break the underlying algorithm. A particular example was mentioned in sec...
{ "page_id": null, "source": 7318, "title": "from dpo" }
dealing with this project. Primar-ily, the applicability of the implemented suite of protocols was assessed in relation to its usage in the implementation of the test case scenario. Erlang as a language of implementation was evaluated as well, and its promised strengths, were assessed. The established algorithms were e...
{ "page_id": null, "source": 7318, "title": "from dpo" }
messages instead of the messages themselves. However, this does not re-ally solve the problem and further investigation of this aspect needs to be studied. As an example, consider the algorithm for regular reliable broadcast . This algorithm required a Delivered sets which holds all messages which were delivered, and p...
{ "page_id": null, "source": 7318, "title": "from dpo" }
transmission control protocol. Hence here, we suggest the study of this idea even further, so as to possibly come up with a solution for these ever growing sets. # 9.3 Different Failure Model In this project, only crash failures were taken into consideration. A process was not expected, or even allowed, to recover once...
{ "page_id": null, "source": 7318, "title": "from dpo" }
operation. Nowadays, various technologies work on this principle, such as cloud com-puting, decentralized distributed databases and peer to peer technologies. Hence such a suite immediately has strong applicability for the development of such systems. Moreover, it could be used to explore the possibility of de-centrali...
{ "page_id": null, "source": 7318, "title": "from dpo" }
random string. The content of this file should be the same on all nodes 156 A.3 Starting a shell In the command prompt write the following. erl -sname NODENAME -peers PEER1 PEER2 PEER3 A.3.1 Explanation This starts the Erlang shell and assigns it the name NODENAME. Here the name of the shell of all peers should also be...
{ "page_id": null, "source": 7318, "title": "from dpo" }
In SOFSEM , pages 10–32, 2001. Cynthia Dwork, Nancy Lynch, and Larry Stockmeyer. Consensus in the presence of partial synchrony. J. ACM , 35(2):288–323, 1988. D. Farina. A case for erlang. 158 Michael J. Fischer, Nancy A. Lynch, and Nancy A. Lynch. A lower bound for the time to assure interactive consistency. Infor...
{ "page_id": null, "source": 7318, "title": "from dpo" }
Title: Introduction to reliable and secure distributed programming URL Source: Markdown Content: [Programming languages for distributed computing systems]( ACM Computing Surveys, 1989 When distributed systems first appeared, they were programmed in traditional sequential languages, usually with the addition of a few l...
{ "page_id": null, "source": 7318, "title": "from dpo" }
we have developed a relational model o f data consistency to replace the conventional serialization mode l for reasoning about the relationships among distributed syste m data objects in general and state variables in particular. We no t only permit but encourage such relationships to be probabilistic , in the interest...
{ "page_id": null, "source": 7318, "title": "from dpo" }
the Archon s This work was sponsored in part by : the USAF Rome Air Development Cente r under contract F30002. 81-C .0297 ; and the US Naval Ocean Systems Center under contract number N66001-81-C-0484 ; and the US Defense Advanced Researc h Projects Agency under contract F33615. 81 JG 1539. Permission to copy without f...
{ "page_id": null, "source": 7318, "title": "from dpo" }
programmer as a concurrent object-oriented language with dataflow synchronization. Oz is based on a higher-order, state-aware, concurrent constraint computation model. Building Secure Resources to Ensure Safe Computations in Distributed and Potentially Corrupted Environments and the verifiers able to securely re-execut...
{ "page_id": null, "source": 7318, "title": "from dpo" }
Testing and model checking techniques can not hope to weed out all behaviors when the state space is infinite. At the other end of the spectrum, constructing proofs by hand is a daunting ... [Robust Distributed Computing and]( 1996 I Sensors that supply data to computer systems are inherently unreliable. When sensors a...
{ "page_id": null, "source": 7318, "title": "from dpo" }
Web services. Distributed computing is the computing mainstream now; it is based on different forms of distributed systems: clusters, grids, peer-to-peer systems, web services, service oriented architectures. This topic provides a forum for research and practice, of interest to both academia and industry, about distrib...
{ "page_id": null, "source": 7318, "title": "from dpo" }
Title: ObstructionFreedom URL Source: Markdown Content: **Note:** You are looking at a static copy of the former PineWiki site, used for class notes by James Aspnes Obstruction-freedom An implementation is **obstruction-free** if, starting from any reachable configuration, any process can finish in a bounded number of...
{ "page_id": null, "source": 7319, "title": "from dpo" }
is a stronger condition that obstruction-freedom: given a lock-free implementation, if we can keep some single process running forever in isolation, we get an infinite execution with only finitely many completed operations. So we have a hierarchy wait-free > lock-free > obstruction-free > locking. 1. Why build obstruct...
{ "page_id": null, "source": 7319, "title": "from dpo" }
write the same value twice, which we can enforce with nonces). This isn't wait-free, because we can keep a snapshot going forever by doing a lot of updates. It _is_ lock-free, because we have to keep doing updates to make this happen. We can make this merely obstruction-free if we work hard (there is no reason to do th...
{ "page_id": null, "source": 7319, "title": "from dpo" }
the other end. While there exist lock-free implementation with this property, there is a particularly simple implementation using CAS that is only obstruction-free. Here's the idea: we represent the deque as an infinitely-long array of compare-and-swap registers (this is a simplification from the paper, which gives a b...
{ "page_id": null, "source": 7319, "title": "from dpo" }
next, [RN, next.version+1]): * if CAS(a[k-1], cur, [RN, cur.version+1]): * return cur.value * else keep trying It's easy to see that in a solo execution, if the oracle doesn't lie, either operation finishes and returns a plausible value after O(1) operations. So the implementation is obstruction-free. But is it also co...
{ "page_id": null, "source": 7319, "title": "from dpo" }
a right-pop, then it can only change a[k-1] after updating a[k]; but in this case the update to a[k] prevents the original right-push from changing a[k]. With some more tedious effort we can similarly show that any interference from a left-push or left-pop either causes the interfering operation or the original operati...
{ "page_id": null, "source": 7319, "title": "from dpo" }
around this. The idea is to start with a small guess for R; if a process is suspected but then wakes up again, we increment the guess. Eventually, the guessed value is larger than the correct value, so no live process will be falsely suspected after this point. To get solo execution, when a process detects a conflict (...
{ "page_id": null, "source": 7319, "title": "from dpo" }
< min-timestamp: * T[winner] ← ∞ _# not looking so winning any more_ * min-timestamp ← other-timestamp * winner ← j * else * if other-timestamp < ∞: * T[j] ← ∞ * if i = winner: * repeat: * execute up to b steps of the underlying algorithm * if we are done: * T[i] ← ∞ * PANIC ← false * return * else * A[i] ← A[i] + 1 * ...
{ "page_id": null, "source": 7319, "title": "from dpo" }
timestamp than my own, I'll drop out myself (T[i] ← ∞), and fight on behalf of its owner instead. At the end of the j loop, either I've decided I am the winner, in which case I try to finish my operation (periodically checking T[i] to see if I've been booted), or I've decided somebody else is the winner, in which case ...
{ "page_id": null, "source": 7319, "title": "from dpo" }
claim holds. The next step is to show that if there is some process i with a minimum timestamp that executes infinitely many operations, it increments A[i] infinitely often (thus eventually making the failure detector stop suspecting it). This gives us Lemma 2 from the paper: Lemma 2 Consider the set of all processes t...
{ "page_id": null, "source": 7319, "title": "from dpo" }
to argue that our previous assumption that there exists a bad process that runs forever without winning leads to a contradiction, by showing that the particular i from the Lemma actually finishes (note that the Lemma doesn't quite do this—we only show that i finishes if it stays active long enough, but maybe it doesn't...
{ "page_id": null, "source": 7319, "title": "from dpo" }
R times this cost waiting. This can be mitigated to some extent by setting b high enough that a winning process is likely to finish in its first unmolested pass through the loop (recall that it doesn't detect that the other processes have reset T[i] until after it makes its attempt to finish). An alternative might be t...
{ "page_id": null, "source": 7319, "title": "from dpo" }
communication costs dominate update costs in the shared-memory implementation), but it is useful to recognize it if we can't prove lower bounds otherwise. Complexity measures that take the cost of simultaneous access into account go by the name of **contention**. The particular notion of contention used in the Fich et ...
{ "page_id": null, "source": 7319, "title": "from dpo" }
of other operations—or in other words, when those other operations need to act on some base object in order to let later operations know they occurred. An object is in the class G if it has some operation Op and initial state s such that for any two processes p and q and every sequence of operations AφA', where (a) φ i...
{ "page_id": null, "source": 7319, "title": "from dpo" }
proof, without having to put a lot of special cases into the proof itself. Lemma A mod-m fetch-and-increment object (with m ≥ n) is in G. Proof This is a classic proof-by-unpacking-the-definition. Pick some execution AφA' satisfying all the conditions, and let a be the number of fetch-and-increments in A and a' the num...
{ "page_id": null, "source": 7319, "title": "from dpo" }
it must be in H. Nobody can overwrite the result of the update (single-writer!), so it follows that Hφ returns a different snapshot from Aφ. 4.3. The lower bound proof -------------------------- Theorem For any obstruction-free implementation of some object in class G from RMW base objects, there is an execution in whi...
{ "page_id": null, "source": 7319, "title": "from dpo" }
as extreme as we thought. In doing so, we can restrict our attention to particularly convenient bad executions, so long as the existence of some bad execution implies the existence of a convenient bad execution. Formally, the authors define a _k-stall execution_ for process p as an execution Eσ 1...σ i where E and σ i ...
{ "page_id": null, "source": 7319, "title": "from dpo" }
with some k-stall execution Eσ 1...σ i,. Extend this execution by a sequence of operations σ in which p runs in isolation until it finishes its operation φ (which it may start in σ if it hasn't done so already), then each process in S runs in isolation until it completes its operation. Now linearize the high-level oper...
{ "page_id": null, "source": 7319, "title": "from dpo" }