Distributed Synchronization



Similar documents
Synchronization in. Distributed Systems. Cooperation and Coordination in. Distributed Systems. Kinds of Synchronization.

Distributed Systems Theory 6. Clock synchronization - logical vs. physical clocks. November 9, 2009

3.7. Clock Synch hronisation

Introduction to Distributed Systems

Clock Synchronization

Clock Synchronization

Best Practices for Leap Second Event Occurring on 30 June 2015

Clock Synchronization

Homework 1 (Time, Synchronization and Global State) Points

Chapter 6: distributed systems

Local Sidereal Time is the hour angle of the First Point of Aries, and is equal to the hour angle plus right ascension of any star.

(Refer Slide Time: 00:01:16 min)

Real-Time Scheduling (Part 1) (Working Draft) Real-Time System Example

The Role of Precise Timing in High-Speed, Low-Latency Trading

Timer, Interrupt, Exception in ARM

Name: 1. CS372H: Spring 2009 Final Exam

Time Calibrator Fountain Computer Products

Evaluating the Accuracy of Maxim Real-Time Clocks (RTCs)

Einstein s Theory of Special Relativity Made Relatively Simple!

PHASOR MEASUREMENT UNIT (PMU) AKANKSHA PACHPINDE

Linux Process Scheduling Policy

Timer Value IRQ IACK

Neonixie 6 Digit Nixie Clock Controller Introduction and Assembly

on an system with an infinite number of processors. Calculate the speedup of

Prof. Ludovico Biagi. Satellite Navigation and Monitoring

Talking Atomic Alarm Clock Instructions

Activity 10 - Universal Time

Astronomy 110 Homework #04 Assigned: 02/06/2007 Due: 02/13/2007. Name:

Time Synchronization & Timekeeping

The basic mode for adjusting a time zone clock are primarily: 21, 24 and 51-1 (51-1 is for Alpha Characters) Entering Mode Programming

A New Paradigm for Synchronous State Machine Design in Verilog

Wide Area Monitoring, Control, and Protection

Post Processing Service

SURVEYING WITH GPS. GPS has become a standard surveying technique in most surveying practices

Principles and characteristics of distributed systems and environments

Sequential Logic Design Principles.Latches and Flip-Flops

Let s put together a Manual Processor

8051 MICROCONTROLLER COURSE

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner

Dr Markus Hagenbuchner CSCI319. Distributed Systems

Freely Falling Objects

Real Time Network Server Monitoring using Smartphone with Dynamic Load Balancing

Time and Causation in Gödel s Universe.

Fair timestamp allocation in distributed systems

Welcome to Shark Performance Management Training. Today s training session is designed to provide you with:

Internet Control Message Protocol (ICMP)

CAD/ CAM Prof. P. V. Madhusudhan Rao Department of Mechanical Engineering Indian Institute of Technology, Delhi Lecture No. # 03 What is CAD/ CAM

1 Organization of Operating Systems

Synchronization of sampling in distributed signal processing systems

DATE AND TIME FOR NINE MILLION JAVA DEVELOPERS

TeachingEnglish Lesson plans

Local Area Networks transmission system private speedy and secure kilometres shared transmission medium hardware & software

Timekeeping in VMware Virtual Machines VMware ESX 3.5/ESXi 3.5, VMware Workstation 6.5

Clocks/timers, Time, and GPS

THE STEERING OF A REAL TIME CLOCK TO UTC(NBS) AND TO UTC by

Asynchronous Counters. Asynchronous Counters

Clocking. Figure by MIT OCW Spring /18/05 L06 Clocks 1

Case for storage. Outline. Magnetic disks. CS2410: Computer Architecture. Storage systems. Sangyeun Cho

Reizen Atomic Talking Analog Alarm Clock Item # Instruction Manual

A Look at SyncE and IEEE 1588

Remote Calibration of a GPS Timing Receiver to UTC(NIST) via the Internet*

HANDBOOK. Measuring System DESIGN EDITORS PETER H. SYDENHAM RICHARD THORN ARTICLE OFFPRINT

Clock Synchronization: Overview and Outlook

Serial Communications

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

CONTROL MICROSYSTEMS DNP3. User and Reference Manual

Chapter 3 Review Math 1030

Use of modern telephone network for time transfer: An innovation

Fault Tolerant Servers: The Choice for Continuous Availability

Lecture 7: Privacy and Security in Mobile Computing. Cristian Borcea Department of Computer Science NJIT

ECE 358: Computer Networks. Homework #3. Chapter 5 and 6 Review Questions 1

(Refer Slide Time: 1:17-1:40 min)

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

The BIPM, the Time Department and UTC

Version control tracks multiple versions. Configuration Management. Version Control. V Software Engineering Lecture 12, Spring 2008

Computer-System Architecture

Time Synchronization in IP Networks J.M.Suri, DDG(I), TEC B.K.Nath, Dir(I), TEC

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Fractal Network Technology Tutorial

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

Clocking. Clocking in the Digital Network

Ring Local Area Network. Ring LANs

Power Quality. Voltage Sag Ride-through Mitigation in Sequence by Increasing Cost

1.2 Teams All teams will be directly invited and selected by Valve to compete in the tournament.

Lecture 10 Sequential Circuit Design Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010

LAN Switching Computer Networking. Switched Network Advantages. Hubs (more) Hubs. Bridges/Switches, , PPP. Interconnecting LANs

Internet Protocol Address

A High Resolution Performance Monitoring Software on the Pentium

State Newton's second law of motion for a particle, defining carefully each term used.

Computer Time Synchronization

Astro 102 Test 5 Review Spring See Old Test 4 #16-23, Test 5 #1-3, Old Final #1-14

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

DISTRIBUTED AND PARALLELL DATABASE

TI GPS PPS Timing Application Note

Copyright 2008 Pearson Education, Inc., publishing as Pearson Addison-Wesley.

INTRUSION PREVENTION AND EXPERT SYSTEMS

S. Boyd EE102. Lecture 1 Signals. notation and meaning. common signals. size of a signal. qualitative properties of signals.

Counters and Decoders

NTP Precision Time Synchronization

GPS NTP TIME SERVER Rack Version V2

Transcription:

CIS 505: Software Systems Lecture Note on Physical Clocks Insup Lee Department of Computer and Information Science University of Pennsylvania Distributed Synchronization Communication between processes in a distributed system can have unpredictable delays, processes can fail, messages may be lost Synchronization in distributed systems is harder than in centralized systems because the need for distributed algorithms. Properties of distributed algorithms: 1 The relevant information is scattered among multiple machines. 2 Processes make decisions based only on locally available information. 3 A single point of failure in the system should be avoided. 4 No common clock or other precise global source exists. Challenge: How to design schemes so that multiple systems can coordinate/synchronize to solve problems efficiently? CIS 505, Spring 2007 1 CIS 505, Spring 2007 Physical Clocks 2 The Myth of Simultaneity and event 2 at same Event Timelines (Example of previous Slide) Node 1 Node 2 Observer A: is earlier than Node 3 Observer B: is simultaneous to Node 4 Observer C: is earlier than e1 e2 = e1 e2 e2 e1 Node 5 Note: The arrows start from an event and end at an observation. The slope of the arrows depend of relative speed of propagation CIS 505, Spring 2007 Physical Clocks 3 CIS 505, Spring 2007 Physical Clocks 4 1

Causality causes Event Timelines (Example of previous Slide) Node 1 Node 2 Observer C: before Observer B: before Observer A: before Node 3 Node 4 Node 5 Requirement: We have to establish causality, i.e., each observer must see event 1 before event 2 CIS 505, Spring 2007 Physical Clocks 5 Note: In the line view, event 2 must be caused by some passage of information from event 1 if it is caused by event 1 CIS 505, Spring 2007 Physical Clocks 6 Why need to synchronize clocks? foo.o created Physical Time Some systems really need quite accurate absolute s. Computer for compiling 2144 2145 2146 2147 Local clock How to achieve high accuracy? Which physical entity may deliver precise timing? Computer for editing 2142 2143 2144 2145 Local clock 1. The sun Today: 1 sec ~ 1 day / 86400 but rotation of earth is slowing down foo.c modified 2. An Atom State transitions in atoms (defined by BIH in Paris) 1 sec = a cesium atom needs for 9 192631 770 state transitions * BIH (Bureau International de l Heure) * TAI (International Atomic Time) CIS 505, Spring 2007 Physical Clocks 7 CIS 505, Spring 2007 Physical Clocks 8 2

Problem with Physical Time A TAI-day is about 3 msec shorter than a day => BHI inserts 1 sec, if the difference between a day and a TAI-day is more than 800msec => UTC (Universal Time Coordinated) is the base of any international measure. Physical Time UTC-signals come from radio broadcasting stations or from satellites (GEOS, GPS) with an accuracy of: 1.0 msec (broadcasting station) 1.0 sec (GPS) GPS on all computers? CIS 505, Spring 2007 Physical Clocks 9 CIS 505, Spring 2007 Physical Clocks 10 Clock Skew Problem Clock skew(offset): the difference between the s on two clocks Clock drift : they count at different rates Ordinary quartz clocks drift by ~ 1sec in 11-12 days. (10-6 secs/sec). High precision quartz clocks drift rate is ~ 10-7 or 10-8 secs/sec Physical clock drift rate Maximum drift rate o One can determine how often they should be synchronized Not all clock s tick precisely at the current rate. CIS 505, Spring 2007 Physical Clocks 11 CIS 505, Spring 2007 Physical Clocks 12 3

Clock Synchronization Adjusting physical clocks: local clock behind reference clock local clock ahead of reference clock Observation: Clocks in DS tend to drift apart and need to be resynchronized periodically A. If local clock is behind a reference clock: could be adjusted in one jump or could be adjusted in a series of small jumps Computer clocks How a computer r works? o A counter register and a holding register. o The counter is decremented by a quartz crystals oscillator. When it reaches zero, an interrupted is generated and the counter is reloaded from the holding register. o E.g., interrupt 60 s per second. Use 61 to run the wall-clock faster by making the value of the holding register smaller. The clock skew problem o logical clocks -- to provide consistent event ordering o physical clocks -- clocks whose values must not deviate from the real by more than a certain amount. B. What to do if local clock is ahead of reference clock? Monotonicity. CIS 505, Spring 2007 Physical Clocks 13 CIS 505, Spring 2007 Physical Clocks 14 Absolute Clock Synchronization (Cristian s Algorithm) computer to be synchronized with a UTC-Receiver t 0 request UTC-Time Server Cristian s Algorithm Initialize local clock: t := t UTC o (Problem: Message Transfer-Time) Estimate Message transfer-, (t 1 -t 0 )/2 t := t UTC + (t 1 - t 0 )/2 o (Problem: Time of the Request Message tr) t UTC T s = to handle the request Suppose: tr is known, t := t UTC + (t 1 - t 0 - t r ) o (Problem: Message transfer-s are load dependent) To improve accuracy: Multiple measurements (t 1 - t 0 ): o Throw away measurements above a threshold value o Take all others to get an average t 1 Assume (t 1 - t 0 ) ranges from [min, max] o What is the accuracy of t? both values (t 0 and t 1 ) are measured with the same clock Centralized server o What if the server crashes? o What if the server gives the wrong? CIS 505, Spring 2007 Physical Clocks 15 CIS 505, Spring 2007 Physical Clocks 16 4

Relative Clock Synchronization (Berkeley Algorithm) The Berkeley Algorithm If you need a uniform (without a UTC-receiver per computer), but you cannot establish a central -server: Peers elect a master Master polls all nodes to give him their s by the clock Averaging algorithm o The daemon asks all the other machines for their clock values. o The machines answer. o The Time daemon tells everyone how to adjust their clock. The master estimates the local s of all nodes regarding the involved message transfer s. Master uses the estimated local s for building the arithmetic mean o Add fault tolerance The deviations from the mean are sent to the nodes o Is this better than sending the actual? CIS 505, Spring 2007 Physical Clocks 17 CIS 505, Spring 2007 Physical Clocks 18 5