Bài giảng Hệ phân tán - Chương 6: Synchronization
Số trang: 52
Loại file: pdf
Dung lượng: 3.69 MB
Lượt xem: 18
Lượt tải: 0
Xem trước 6 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Bài giảng Hệ phân tán - Chương 6: Synchronization. Chương này cung cấp cho sinh viên những nội dung gồm: clock synchronization; logical clock; mutual exclusion; election algorithm;... Mời các bạn cùng tham khảo chi tiết nội dung bài giảng!
Nội dung trích xuất từ tài liệu:
Bài giảng Hệ phân tán - Chương 6: Synchronization CHAPTER 6:SYNCHRONIZATIONDR. TRẦN HẢI ANH Based on the lectures of Assoc. Prof. Hà Quốc TrungContents ¨ Clock synchronization ¨ Logical clock ¨ Mutual exclusion ¨ Election algorithm Synchronization¨ How process synchronize ¤ Multiple process to not simultaneously access to the same resources: printers, files ¤ Multiple process are agreed on the ordering of event. n Ex: message m1 of P is sent after m2 of Q¨ Synchronization based on actual time¨ Synchronization by relative ordering1. Clock Synchronization¨ Notion of synchronization¨ Physical Clocks¨ Global Positioning System¨ Clock Synchronization Algorithms¨ Use of Synchronized ClocksWhy do we need it?Example 1: Programming in DS¨ When each machine has its own clock, an event that occurred after another event may nevertheless be assigned an earlier time.Example 2: Global PositioningSystem (1)Computing a position in a two-dimensional spaceGlobal Positioning System (2)¨ Real world facts that complicate GPS1. It takes a while before data on a satellite’s position reaches the receiver.2. The receiver’s clock is generally not in synch with that of a satellite.Physycal Clocks¨ Timer¨ Counter & Holding register¨ Clock tick¨ Problem in distributed systems: ¤ How do we synchronize RTC IC them with real-world? (Real Time Clock) ¤ How do we synchronize the clocks with each other?Physical Clocks (1) Computation of the mean solar day Physical Clocks (2)¨ TAI seconds are of constant length, unlike solar seconds. Leap seconds are introduced when necessary to keep in phase with the sun.¨ => UTC (Universal Cordinated Time)Clock Synchronization Algorithms ¨ Network Time Protocol ¨ Berkeley Algorithm ¨ Clock Synchronization in Wireless NetworksNetwork Time Protocol Getting the current time from a time serverThe Berkeley Algorithm (1)¨ The time daemon asks all the other machines for their clock values.The Berkeley Algorithm (2)¨ The machines answer.The Berkeley Algorithm (3)¨ The time daemon tells everyone how to adjust their clock. Clock Synchronization in Wireless Networks (1)¨ The usual critical path in determining network delays.Clock Synchronization in WirelessNetworks (2)¨ The critical path in the case of RBS.2. Logical clock¨ Lamport logical clocks¨ Vector clocks2.1. Lamport’s Logical Clocks (1)¨ The happens-before relation → can be observed directly in two situations: 1. If a and b are events in the same process, and a occurs before b, then a → b is true. 2. If a is the event of a message being sent by one process, and b is the event of the message being received by another process, then a → b¨ Transitive relation: a → b and b → c, then a → c¨ ConcurrentLamport’s Logical Clocks (2)¨ Three processes, each with its own clock. The clocks run at different rates.
Nội dung trích xuất từ tài liệu:
Bài giảng Hệ phân tán - Chương 6: Synchronization CHAPTER 6:SYNCHRONIZATIONDR. TRẦN HẢI ANH Based on the lectures of Assoc. Prof. Hà Quốc TrungContents ¨ Clock synchronization ¨ Logical clock ¨ Mutual exclusion ¨ Election algorithm Synchronization¨ How process synchronize ¤ Multiple process to not simultaneously access to the same resources: printers, files ¤ Multiple process are agreed on the ordering of event. n Ex: message m1 of P is sent after m2 of Q¨ Synchronization based on actual time¨ Synchronization by relative ordering1. Clock Synchronization¨ Notion of synchronization¨ Physical Clocks¨ Global Positioning System¨ Clock Synchronization Algorithms¨ Use of Synchronized ClocksWhy do we need it?Example 1: Programming in DS¨ When each machine has its own clock, an event that occurred after another event may nevertheless be assigned an earlier time.Example 2: Global PositioningSystem (1)Computing a position in a two-dimensional spaceGlobal Positioning System (2)¨ Real world facts that complicate GPS1. It takes a while before data on a satellite’s position reaches the receiver.2. The receiver’s clock is generally not in synch with that of a satellite.Physycal Clocks¨ Timer¨ Counter & Holding register¨ Clock tick¨ Problem in distributed systems: ¤ How do we synchronize RTC IC them with real-world? (Real Time Clock) ¤ How do we synchronize the clocks with each other?Physical Clocks (1) Computation of the mean solar day Physical Clocks (2)¨ TAI seconds are of constant length, unlike solar seconds. Leap seconds are introduced when necessary to keep in phase with the sun.¨ => UTC (Universal Cordinated Time)Clock Synchronization Algorithms ¨ Network Time Protocol ¨ Berkeley Algorithm ¨ Clock Synchronization in Wireless NetworksNetwork Time Protocol Getting the current time from a time serverThe Berkeley Algorithm (1)¨ The time daemon asks all the other machines for their clock values.The Berkeley Algorithm (2)¨ The machines answer.The Berkeley Algorithm (3)¨ The time daemon tells everyone how to adjust their clock. Clock Synchronization in Wireless Networks (1)¨ The usual critical path in determining network delays.Clock Synchronization in WirelessNetworks (2)¨ The critical path in the case of RBS.2. Logical clock¨ Lamport logical clocks¨ Vector clocks2.1. Lamport’s Logical Clocks (1)¨ The happens-before relation → can be observed directly in two situations: 1. If a and b are events in the same process, and a occurs before b, then a → b is true. 2. If a is the event of a message being sent by one process, and b is the event of the message being received by another process, then a → b¨ Transitive relation: a → b and b → c, then a → c¨ ConcurrentLamport’s Logical Clocks (2)¨ Three processes, each with its own clock. The clocks run at different rates.
Tìm kiếm theo từ khóa liên quan:
Bài giảng Hệ phân tán Hệ phân tán Đồng bộ hóa Clock synchronization Logical clock Mutual exclusion Election algorithmGợi ý tài liệu liên quan:
-
Lecture Operating systems: Lesson 21 - Dr. Syed Mansoor Sarwar
22 trang 312 0 0 -
Khảo sát, đánh giá một số thuật toán xử lý tương tranh cập nhật dữ liệu trong các hệ phân tán
7 trang 184 0 0 -
Chương 6 Thuật toán loại trừ tương hỗ và bầu cử
45 trang 89 0 0 -
Báo cáo Hệ tin học phân tán: Vấn đề bế tắc trong hệ tập trung và hệ phân tán
48 trang 35 0 0 -
Lecture Distributed systems (3/E) - Chapter 6: Coordination
71 trang 29 0 0 -
Chương 1 Giới thiệu tổng quan về hệ phân tán
66 trang 27 0 0 -
NHẬP MÔN CƠ SỞ DỮ LIỆU PHÂN TÁN - TS NGUYỄN BÁ TƯỜNG
591 trang 26 0 0 -
26 trang 24 0 0
-
Lecture Operating systems: Internalsand design principles (7/e): Chapter 5 - William Stallings
61 trang 23 0 0 -
73 trang 22 0 0