• Nenhum resultado encontrado

data structures

N/A
N/A
Protected

Academic year: 2023

Share "data structures"

Copied!
34
0
0

Texto

Equivalent history Let represent the projection of Ĥna processp, i.e. limiting the operations that take place in the processup. In the implementation shown in Figure 2, this means that even though paris reads2inX (and thus sees berlin's writing after its own writing), berlin can still read1in b (thus detecting 'X.write(1)' and 'X.write(2 )' in the opposite order to that of Paris). A stringT2 is then computed, which is a subset of T1, such that any received message that has not yet been co-delivered can cause a mis-w.r.t.G- toco-delivery of message T2.

Figure 1: new-york does not need to be closely synchronized with paris and berlin, calling for a hybrid form of consistency
Figure 1: new-york does not need to be closely synchronized with paris and berlin, calling for a hybrid form of consistency

Proof of Theorem 1

We first show that ifm has been toco-supplied bypi, then causmj[j] < causali[j], outside lines 28-29. This implication follows from the conditions causmj[⋅] ≤causali[⋅] on line 21, and the increment on line 29. We want to show that there is only one additional message, and that this message ism0, the message that just has been supplied on line 28, completing the induction and proving the lemma.

From this entity and (7), we conclude that aftercausali[j0] has been incremented on line 29 if a message sent by Pj0 confirms the cause. All messages toco-broadcast using Algorithm 1 are eventually toco-delivered by all processes in the system. In other words, mk belongs to the causal past ofmi, and because of the condition onC(line 21) and the increment on line 29, we have.

If the byp has already been received, it has presumably not yet been submitted together, and is therefore independent. Because sem is chosen in T2j in line 25, (29) implies that it is no longer independent, and thus must have been delivered from before, which.

An Algorithm Implementing G -Fisheye (SC,CC)-Consistency .1 The high level object operations read and write

Proof of Theorem 5

H is acyclic, since assuming otherwise would mean that at least one of the WRITE(X,v) messages was received before it was sent. From the (SC,CC)-broadcast causality, we also conclude that WRITEr(X,v′) is co-compiled by q before the execution of rq(X,v). To construct↝★H,G, as required by the definition of (SC,CC)-consistency (Section 2.2.2), we need to arrange the write operations of neighboring processes in the proximity graphG.

As a result of the G delivery command and termination of the toco transmission (Section 3.1), we know that all pairs of WRITEp(X,v)andWRITEp(Y,w)messages with(p,q) ∈EG as defined above are toco -delivered in the same order by all processes. To complete the proof, we choose, for each process pi, ̂Si as one of the topological kinds (↝★H,G)∣(pi+W), following the approach of [MZR95, Ray13].Ŝis sequential by construction. This contribution follows the long search for the (a) strongest consistency criterion (there may exist several incomparable criteria) that is implementable for different types of objects in an asynchronous system where all processes except one can crash (wait-free systems [Her91]).

The purpose of an operation depends not only on the operation and the state in which it is performed, but also on the purposes of the current operations. This class covers all data structures where an operation either changes the state of an object (update) or returns a function about the current state of an object (query).

Figure 5: Proving that ↝ H is causal by contradiction
Figure 5: Proving that ↝ H is causal by contradiction

Abstract Data Types and Consistency Criteria

We prove that in a wait-free asynchronous system it is not possible to implement ultimate and causal consistency for all UQ-ADTs. We introduce update consistency, a new consistency criterion that is stronger than eventual consistency and requires the converging state to be consistent with a linearization of the updates. In the beginning the set is empty and when an element is inserted, it remains until it is removed.

The setU of updates is the set of all insertions and deletions of each value of Val. The setS of the possible states is the same as the set of possible values ​​returned Qoas the read query returns the contents of the set object. D(v)) with v∈Val indicates an insertion (or a deletion) operation of the value vin in the set object. R/s denotes a read operation that returns the sets representing the contents of the set.

This execution produces a set of partially ordered events labeled by the operations of the abstract data type. It is also possible to model more complex modern systems in which new threads are dynamically created and destroyed, or peer-to-peer systems where peers can join and leave.

Eventual Consistency

6a is ultimately not strongly consistent, because theI(1) must be visible through all the queries of the first process (through reflexivity and growth), so there are only two possible sets of visible updates ({I(1)}and{I ( 1),I(2)}) for these events, but the queries are done in three different states ({1},{2}and∅); therefore, at least two of these queries see the same set of updates and must therefore return the same value. 6c, on the contrary, is ultimately strongly consistent: the replicas that see {I(1)} are in state ∅ and those that see {I(1),I(2)} are in state {1,2}.

Pipelined Convergence

If the first read of p1 returns {1,3}, since the array is pipeline consistent, there must be a linearization for p1 containing all updates, R/{1,3}, and an infinite number of queries. Consequently, causal consistency, which is stronger than pipeline consistency, cannot be satisfied along with eventual consistency in a no-wait system.

Definitions

6d shows an example of a strongly consistent update history: nothing prevents another process from seeing insert 2 before inserting 1. Strong end-consistency and update consistency do not mean strong update consistency: in the history of figure 6c, after event I(1) is executed, the only three possible linearization of the updates I(1), I(1) ⋅I(2) and I(2) ⋅I(1) and none of them can lead to the state ∅ according to the sequential specification of the bulk object.

If H is strongly update consistent, then it is both strongly eventually consistent and update consistent. Since the number of updates is limited, there is a limited prefix vofw that contains them all. All queries that are inw, but not invretur the same states, and the number of queries inQ′andwise finite.

Q′= ⋃u∈UH{q∈QH,q≤u}is finite, andlin(EH∖Q′) contains only one word which is also contained in L(O).

Expressiveness of Update Consistency: a Case Study

All of these arrays, and ultimately consistent objects in general, behave differently when used in distributed programs. If we focus only on the final state, it is appropriate to use an updated consistent object instead of a finally consistent object, since the final state is the same as if no operations were concurrent. Even if strong update consistency is stronger than strong eventual consistency, we cannot generally say that a strong update-consistent object can always be used instead of its strong final-consistent counterpart.

A historyH is strong eventually consistent for the Insert-wins set on a supportValif it is strong eventually consistent for the setSVa and the visibility relationÐ→vis verifies the following additional property. On the contrary, a strong update-consistent implementation of a set can always be used instead of an Insert-wins set, since it only prohibits multiple histories. Also, no two updates for the same element are simultaneous according toÐ→IW, and the last updates are also the last for the ≤relation, hence his strong eventually consistent for set Insert wins.

This result implies that an OR set can always be replaced by an update-consistent set, because the guarantees it insures are weaker than those of the update-consistent set. In this section, we provide a generic construct of highly update-consistent objects in crash-prone asynchronous message passing systems.

System Model

The relationÐ→IW is acyclic because it is included in≤, its growth and eventual delivery properties are ensured by the fact that it containsÐ→show. It can be seen as a cache-consistent set [Goo91] that in some cases can have better space complexity than update consistency. This construct is not the most efficient ever, as it is intended to work for any UQ-ADT object to prove the universality of update consistency.

A universal implementation

A historyHis allowed by the algorithm ifupdate(u) is called every time a process performs an updateu, enquery(qi) is called and returnsqwhen the event qi/qappears in the history. Each process pi manages its watch clock from the logical clock and a list of updates from all time-stamped update events that the process is aware of. When a message (cl,j,u) is received, it updates its clock and inserts the event into the list updatesi.

When a query is issued, the query() function locally reviews the entire list of update events, aware of starting from the initial state, then it executes the query in the state it receives. Let e,e' ∈ EH be two operations called by processes pi and pi', respectively in states (update, hour) and (update', hour). It is growing because the set of messages received by a process is growing over time.

This lexical order is perfect because two operations in the same process have different clocks. Moreover, the history contains at most c×n+events, where is the number of processes, so it is finite.

Complexity

This algorithm is very close to ours, as it builds a converged state from a linearization of the updates stored by each replica. Since this is a very common case in distributed systems, we now focus on the shared memory object. Since old values ​​can never be read again, they don't need to be stored forever, so the algorithm stores only the last known value of each register and its timestamp in local memory implemented with an associative array.

When a process receives notification of a write, it updates its local state if the value is newer than the current one, and the read operations just return the current value. This implementation only needs constant computation time for both reads and writes, and the complexity of the memory only grows logarithmically with time and the number of participants. The second consists of a new consistency criterion, update consistency, which is stronger than eventual consistency and weaker than sequential consistency.

Update consistency formalizes the intuitive ideas of sequential specification for an abstract data type and distributed history. InProceedings of the Nineteenth Annual ACM Symposium on Principles of Distributed Computing, PODC ’00, pages 7–, New York, NY, USA, 2000.

Imagem

Figure 1: new-york does not need to be closely synchronized with paris and berlin, calling for a hybrid form of consistency
Figure 2: Executing the program of Figure 1.
Figure 4: Illustrating G-fisheye (SC,CC)-consistency
Figure 5: Proving that ↝ H is causal by contradiction
+2

Referências

Documentos relacionados

Quanto a este medo, não nos parece que o tipo de escolarização permitido pelo Estado Novo tenha causado os danos esperados. Poucos eram os que usavam proveitosamente a parca