




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 性别对个人财务管理的影响计划
- 《魅力化学》课程教学大纲
- 企业信息安全的加密与保护策略
- 企业并购后内部控制体系建设
- 促进学生健康成长的品德措施计划
- 学校生物教师考核标准计划
- 社区集体经济的模式探索计划
- 2025年司法行政工作总体要求
- 儿童营养不均衡的饮食调整与康复
- 中小企业融资难题的解决路径
- 2025年安徽水利水电职业技术学院单招职业适应性测试题库带答案
- 2025年南京信息职业技术学院单招职业技能测试题库及答案一套
- 2025年桐城师范高等专科学校单招职业适应性测试题库审定版
- 2025至2030年中国鹅蛋数据监测研究报告
- 2024年安徽省公务员【申论】考试真题及答案-(A卷+B卷+C卷)三套
- 2025年充电桩场地租赁合同官方版模板
- DeepSeek的应用与部署
- 初中班会 《哪吒 2:勇战困难伴梦前行》开学第一课主题班会 教案
- 《马尔科夫过程介绍》课件
- 四川成都历年中考语文现代文阅读之非连续性文本阅读4篇(截至2024年)
- 中国地图填色图(任何颜色可变)
评论
0/150
提交评论