1 / 9

Consistency and Replication

Consistency and Replication. CSCI 4780/6780. Sequential Consistency. Slightly weaker consistency model

decima
Download Presentation

Consistency and Replication

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Consistency and Replication CSCI 4780/6780

  2. Sequential Consistency • Slightly weaker consistency model • “The result of any execution is the same as if the read & write operations by all the processes on the data store were executed in some sequential order and the operations of each individual process appear in this sequence in the order specified by its program” • Any valid interleaving of read and write operations • All processes should see the same interleaving of operations • Time does not play a role in this model

  3. Sequential Consistency - Example • A sequentially consistent data store. • A data store that is not sequentially consistent.

  4. Causal Consistency • Weaker than sequential consistency • Differentiates between causally related events and those that are not • Example: Process P1 writes x. Process P2 reads x and writes y. Reading of x and writing on y are potentially causally related. However two independent writes are not causally related • “Writes that are potentially casually related must be seen by all processes in the same order. Concurrent writes may be seen in a different order on different machines.”

  5. Casual Consistency - Example • This sequence is allowed with a casually-consistent store, but not with sequentially or strictly consistent store.

  6. Casual Consistency- Example [Contd.] • A violation of a casually-consistent store. • A correct sequence of events in a casually-consistent store.

  7. Operation Grouping • Sequential and causal consistency are at the granularity of reads/writes • Suits hardware implementation • Does not match the granularity of applications • Concurrency control through synchronization mechanisms • ENTER_CS and LEAVE_CS primitives • Brackets a series of reads and writes into an atomic unit • Acquire and Release lock • Owner of an variable • Exclusive and non-exclusive modes

  8. Grouping Operations • Necessary criteria for correct synchronization: • An acquire access of a synchronization variable, not allowed to perform until all updates to guarded shared data have been performed with respect to that process. • Before exclusive mode access to synchronization variable by process is allowed to perform with respect to that process, no other process may hold synchronization variable, not even in nonexclusive mode. • After exclusive mode access to synchronization variable has been performed, any other process’ next nonexclusive mode access to that synchronization variable may not be performed until it has performed with respect to that variable’s owner.

  9. Grouping Operations - Example • Figure 7-10. A valid event sequence for entry consistency.

More Related