




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、DISTRIBUTED SYSTEMSPrinciples and ParadigmsSecond EditionANDREW S. TANENBAUMMAARTEN VAN STEENChapter 7Consistency And ReplicationTanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Reasons for ReplicationData are re
2、plicated to increase the reliability of a system.Replication for performanceScaling in numbersScaling in geographical areaCaveatGain in performanceCost of increased bandwidth for maintaining replication Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall,
3、 Inc. All rights reserved. 0-13-239227-5Data-centric Consistency ModelsFigure 7-1. The general organization of a logical data store, physically distributed and replicated across multiple processes.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc.
4、All rights reserved. 0-13-239227-5Continuous Consistency (1)Figure 7-2. An example of keeping track of consistency deviations adapted from (Yu and Vahdat, 2002).Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Co
5、ntinuous Consistency (2)Figure 7-3. Choosing the appropriate granularity for a conit. (a) Two updates lead to update propagation. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Continuous Consistency (3)Figure
6、7-3. Choosing the appropriate granularity for a conit. (b) No update propagation is needed (yet).Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Sequential Consistency (1)Figure 7-4. Behavior of two processes op
7、erating on the same data item. The horizontal axis is time.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Sequential Consistency (2)A data store is sequentially consistent when:The result of any execution is th
8、e same as if the (read and write) operations by all 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.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e,
9、 (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Sequential Consistency (3)Figure 7-5. (a) A sequentially consistent data store. (b) A data store that is not sequentially consistent.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc.
10、All rights reserved. 0-13-239227-5Sequential Consistency (4)Figure 7-6. Three concurrently-executing processes.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Sequential Consistency (5)Figure 7-7. Four valid exe
11、cution sequences for the processes of Fig. 7-6. The vertical axis is time.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Causal Consistency (1)For a data store to be considered causally consistent, it is necess
12、ary that the store obeys the following condition:Writes that are potentially causally related must be seen by all processesin the same order. Concurrent writes may be seen in a different order on different machines.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Pr
13、entice-Hall, Inc. All rights reserved. 0-13-239227-5Causal Consistency (2)Figure 7-8. This sequence is allowed with a causally-consistent store, but not with a sequentially consistent store.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rig
14、hts reserved. 0-13-239227-5Causal Consistency (3)Figure 7-9. (a) A violation of a causally-consistent store. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Causal Consistency (4)Figure 7-9. (b) A correct sequen
15、ce of events in a causally-consistent store.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Grouping Operations (1)Necessary criteria for correct synchronization:An acquire access of a synchronization variable,
16、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 non
17、exclusive 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 variables owner.Tanenbaum & Van Steen, Distributed Systems: Pri
18、nciples and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Grouping Operations (2)Figure 7-10. A valid event sequence for entry consistency.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-
19、239227-5Eventual ConsistencyFigure 7-11. The principle of a mobile user accessing different replicas of a distributed database.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Monotonic Reads (1)A data store is s
20、aid to provide monotonic-read consistency if the following condition holds:If a process reads the value of a data item x any successive read operation on x by that process will always return that same value or a more recent value.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms,
21、2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Monotonic Reads (2)Figure 7-12. The read operations performed by a single process P at two different local copies of the same data store. (a) A monotonic-read consistent data store. Tanenbaum & Van Steen, Distributed Systems: Princip
22、les and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Monotonic Reads (3)Figure 7-12. The read operations performed by a single process P at two different local copies of the same data store. (b) A data store that does not provide monotonic reads.Tanenbaum & Van Steen
23、, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Monotonic Writes (1)In a monotonic-write consistent store, the followingcondition holds:A write operation by a process on a data item x is completed before any successive write operati
24、on on x by the same process.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Monotonic Writes (2)Figure 7-13. The write operations performed by a single process P at two different local copies of the same data st
25、ore. (a) A monotonic-write consistent data store. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Monotonic Writes (3)Figure 7-13. The write operations performed by a single process P at two different local copi
26、es of the same data store. (b) A data store that does not provide monotonic-write consistency.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Read Your Writes (1)A data store is said to provide read-your-writes
27、consistency, if the following condition holds:The effect of a write operation by a process on data item x will always be seen by a successive read operation on x by the same process.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights rese
28、rved. 0-13-239227-5Read Your Writes (2)Figure 7-14. (a) A data store that provides read-your-writes consistency. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Read Your Writes (3)Figure 7-14. (b) A data store
29、that does not.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Writes Follow Reads (1)A data store is said to provide writes-follow-reads consistency, if the following holds:A write operation by a process on a da
30、ta item x following a previous read operation on x by the same process is guaranteed to take place on the same or a more recent value of x that was read.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Writes Fol
31、low Reads (2)Figure 7-15. (a) A writes-follow-reads consistent data store. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Writes Follow Reads (3)Figure 7-15. (b) A data store that does not provide writes-follow
32、-reads consistency.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Replica-Server PlacementFigure 7-16. Choosing a proper cell size for server placement.Tanenbaum & Van Steen, Distributed Systems: Principles and
33、 Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Content Replication and PlacementFigure 7-17. The logical organization of different kinds of copies of a data store into three concentric rings.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c)
34、 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Server-Initiated ReplicasFigure 7-18. Counting access requests from different clients.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5State versus OperationsPossibilities for what is to be propagated:Propagate only a notification of an update.Transfer data from one copy to another.Propagate the update operation to other copies.Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rig
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 衢江区游乐设施管理办法
- 襄阳市道路管理办法规定
- 西秀区人才津贴管理办法
- 论坛管理研讨会暂行办法
- 评标委员会管理暂行办法
- 财务负责人委派管理办法
- 购物卡会计凭证管理办法
- 贵州省防洪预案管理办法
- 资产证券化业务管理办法
- 足球俱乐部运营管理办法
- DB43∕T 876.2-2014 高标准农田建设 第2部分:土地平整
- 针灸科重点病种诊疗方案
- 从管控到赋能:我国文艺演出市场发展进程中政府职能转变探究
- 光伏电站安全规程培训
- 贵州省贵阳市2025年八年级英语第二学期期末考试试题含答案
- 高水平专业群建设与产业适配性研究
- 中医养生保健知识讲座讲课件
- 2025至2030中国防爆设备行业发展分析及发展前景与投资报告
- 科研团队经费管理制度
- 药品企业研发管理制度
- 商协会公章管理制度
评论
0/150
提交评论