




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 農村房屋粉刷合同范例
- 住房裝修拆除合同范本
- 個人采購合同范例
- 與學校合作辦學合同范例
- 買車訂單合同范例
- 內部酒吧轉讓合同范例
- 儀式外包合同范例
- 出租小屋物品合同范例
- 買房佛山合同范例
- 會務人力采購合同范例
- 2025年上半年廣西宏桂集團匯興資產管理限公司招聘5人易考易錯模擬試題(共500題)試卷后附參考答案
- 2025年安徽中醫(yī)藥高等??茖W校高職單招職業(yè)適應性測試近5年常考版參考題庫含答案解析
- 2025年楊凌職業(yè)技術學院高職單招高職單招英語2016-2024歷年頻考點試題含答案解析
- 2025年滬科版八年級生物下冊階段測試試卷
- 2024年08月浙江龍灣農商銀行秋季招考筆試歷年參考題庫附帶答案詳解
- 高教社馬工程倫理學(第二版)教學課件10
- 三年級 下冊《花鐘》課件
- 中國糖尿病防治指南(2024版)圖文完整版
- 期末考試成績分析報告課件
- 農業(yè)土壤改良技術手冊
- DG∕TJ 08-89-2016 空間格構結構工程質量檢驗及評定標準
評論
0/150
提交評論