CLOCK SYNCHRONIZATION SUSMITHA KOTA 21- SEP-2015.

Slides:



Advertisements
Similar presentations
Synchronization.
Advertisements

Decentralized Reactive Clustering in Sensor Networks Yingyue Xu April 26, 2015.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Distributed Computing
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Distributed Systems Spring 2009
LEADER ELECTION CS Election Algorithms Many distributed algorithms need one process to act as coordinator – Doesn’t matter which process does the.
4. Synchronization Clock synchronization
1. Explain why synchronization is so important in distributed systems by giving an appropriate example When each machine has its own clock, an event that.
Synchronization Clock Synchronization Logical Clocks Global State Election Algorithms Mutual Exclusion.
Election AlgorithmsCS-4513 D-term Election Algorithms CS-4513 Distributed Computing Systems (Slides include materials from Operating System Concepts,
Computer Science Lecture 11, page 1 CS677: Distributed OS Last Class: Clock Synchronization Logical clocks Vector clocks Global state.
Synchronization in Distributed Systems. Mutual Exclusion To read or update shared data, a process should enter a critical region to ensure mutual exclusion.
SynchronizationCS-4513, D-Term Synchronization in Distributed Systems CS-4513 D-Term 2007 (Slides include materials from Operating System Concepts,
Synchronization in Distributed Systems CS-4513 D-term Synchronization in Distributed Systems CS-4513 Distributed Computing Systems (Slides include.
1 CLOCK SYNCHRONIZATION " Synchronization in distributed systems is more complicated than in centralized ones because the former have to use distributed.
Clock Synchronization and algorithm
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
EEC-681/781 Distributed Computing Systems Lecture 10 Wenbing Zhao Cleveland State University.
EEC-681/781 Distributed Computing Systems Lecture 10 Wenbing Zhao Cleveland State University.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
Lecture 9: Time & Clocks CDK4: Sections 11.1 – 11.4 CDK5: Sections 14.1 – 14.4 TVS: Sections 6.1 – 6.2 Topics: Synchronization Logical time (Lamport) Vector.
1 Synchronization Part 1 REK’s adaptation of Claypool’s adaptation of Tanenbaum’s Distributed Systems Chapter 5.
Election Algorithms and Distributed Processing Section 6.5.
Election Algorithms. Topics r Issues r Detecting Failures r Bully algorithm r Ring algorithm.
Synchronization.
1 Physical Clocks need for time in distributed systems physical clocks and their problems synchronizing physical clocks u coordinated universal time (UTC)
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Naming CSCI 4780/6780. Attribute-based Naming Flat and structured names provide location transparency Structured names are also human-friendly Increasingly,
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 6 Synchronization.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Naming Name distribution: use hierarchies DNS X.500 and LDAP.
Synchronization CSCI 4900/6900. Importance of Clocks & Synchronization Avoiding simultaneous access of resources –Cooperate to grant exclusive access.
Synchronization CSCI 4780/6780. Mutual Exclusion Concurrency and collaboration are fundamental to distributed systems Simultaneous access to resources.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Synchronization. Why we need synchronization? It is important that multiple processes do not access shared resources simultaneously. Synchronization in.
Synchronization Chapter 5.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed Systems Principles and Paradigms Chapter 05 Synchronization.
Time This powerpoint presentation has been adapted from: 1) sApr20.ppt.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Real-Time & MultiMedia Lab Synchronization Distributed System Jin-Seung,KIM.
Synchronization CSCI 4900/6900. Importance of Clocks & Synchronization Avoiding simultaneous access of resources –Cooperate to grant exclusive access.
Variable Bandwidth Allocation Scheme for Energy Efficient Wireless Sensor Network SeongHwan Cho, Kee-Eung Kim Korea Advanced Institute of Science and Technology.
Distributed Process Coordination Presentation 1 - Sept. 14th 2002 CSE Spring 02 Group A4:Chris Sun, Min Fang, Bryan Maden.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
6 SYNCHRONIZATION. introduction processes synchronize –exclusive access. –agree on the ordering of events much more difficult compared to synchronization.
Synchronization. Clock Synchronization In a centralized system time is unambiguous. In a distributed system agreement on time is not obvious. When each.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
Distributed Mutual Exclusion Synchronization in Distributed Systems Synchronization in distributed systems are often more difficult compared to synchronization.
9.2 SECURE CHANNELS JEJI RAMCHAND VEDULLAPALLI. Content Introduction Authentication Message Integrity and Confidentiality Secure Group Communications.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
Synchronization in Distributed Systems In a single CPU system, critical regions, mutual exclusion and other synchronization problems are generally solved.
Prof. Leonardo Mostarda University of Camerino
Distributed Computing
CSC 8320 Advanced Operating Systems Spring 2006
Distributed Processing Election Algorithm
Logical time (Lamport)
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Chapter 5 (through section 5.4)
CDK: Sections 11.1 – 11.4 TVS: Sections 6.1 – 6.2
Logical time (Lamport)
Prof. Leonardo Mostarda University of Camerino
Logical time (Lamport)
Logical time (Lamport)
Last Class: Naming Name distribution: use hierarchies DNS
Presentation transcript:

CLOCK SYNCHRONIZATION SUSMITHA KOTA 21- SEP-2015

AGENDA 1.Introduction 2.Synchronization 3.Physical Clocks 4.Global Positioning System 5.Algorithms 6.Future Work 7.References

Introduction: Real Time System 1. A computer system in which the correctness of the system behavior depends on logical results of the computations time when the results are produced 2. Communicates strongly with the physical environment. The high level steps are: Receiving data Processing data Returning results in right time

Introduction: Synchronization 1.Communication is important, but how processes synchronize to communicate is more important. 2.Synchronization is distributed systems is more difficult compared to that in uniprocessor systems. Why Synchronization? 1.To order events produced by concurrent processes. 2.To coordinate between senders and receivers of messages. 3.To serialize the concurrent access of shared objects.

Synchronization: Example Printer 1. Multiple processes do not simultaneously access a shared resource. 2. Instead, they cooperate to grant each other temporary exclusive access. 3. Processes need to agree on ordering of events. 4. For instance, whether message ml from process P or message m2 from process Q was sent first.

Physical Clocks 1.Computer Timer is a better word. 2.It is usually a precisely machined quartz crystal. 3.Each crystal has two registers Counter Holding Register 4.Each oscillation of the crystal decrements the counter by one. 5.When counter decrements to 0, interrupt is generated and counter is reloaded from holding register. 6.With a single computer and a single clock, it does not matter much if this clock is off by a small amount. What happens in distributed systems?

Physical Clocks: Example 1. UNIX Make program’s action when editor and compiler are on two different systems. 2. Timestamp of input.cTimestamp of input.oMake Program’s Action Re-compiles input.c Timestamp of output.cTimestamp of output.oMake Program’s Action Does not re-compile output

Physical Clocks in Distributed Systems 1.Frequency of each crystal is stable, but crystals in different computers may run at different frequencies. 2.This causes the software clocks to get out of synchronization. 3.The difference in time values is called as Clock Skew. 4.Programs that expect a timestamp along with the file may fail. 5.To increase efficiency and redundancy, having multiple physical clocks is desirable. 6.How to synchronize these clocks with real world clocks? How to synchronize the clocks with each other?

Global Positioning System Problem: Determining the geographical position anywhere on the earth. Solution: Global Positioning System, a satellite based distributed system. 1.Mostly used in Military applications, mobile phones. 2.Uses 29 satellites circulating in an orbit. Each satellite has 4 clocks. 3.A satellite continuously broadcasts its position, and timestamps messages with local time. 4.

Algorithms: Bully Algorithm 1. Each process has a unique numerical ID 2. Processes know the Ids and address of every other process in that network 3. Communication is assumed reliable 4. The main idea is to select a process with highest ID 5. When the coordinator fails, process initiates 6. There are three message types: election, OK and I won 7. Several processes can initiate an election simultaneously, but wait for response from other processes.

Algorithms: Bully Algorithm 1.Any process P can initiate an election based on requirement. 2.P sends Election messages to all process with higher Ids and waits for OK messages in response. 3.If there are no OK messages, P becomes coordinator and sends I won messages to all process with lower Ids. 4.When P receives an OK message, then it drops out and waits for an I won message. 5.When a process receives an Election message, it returns an OK and starts an election. 6.When a process receives a I won message, it treats sender as the coordinator.

Algorithms: Bully Algorithm a)Process 4 holds an election. b)Process 5 and 6 respond with an OK message, asking 4 to stop. c)Now 5 and 6 each hold an election to see who wins.

Algorithms: Bully Algorithm d)Process 6 tells 5 to stop sending messages. e)Process 6 wins and announces that it’s the coordinator.

Algorithm: The Berkeley Algorithm a)The time server is active. It asks the clients for their time. b)The time server, computes the average time. c)Tells all the other machines to advance their clocks to the new time. May also, ask to slow their clocks down until some specified reduction has been achieved.

Algorithm: The Berkeley Algorithm 1. This method is suitable for a system in which no machine has a WWV receiver. 2. The time daemon's time must be set manually by the operator periodically. 3. This is sufficient for all machines that agree on the same time. 4. It is not essential that this time also agrees with the real time WWV - United States National Institute of Standards and Technology's (NIST) radio station that continuously transmits official U.S. Government frequency and time signals on 2.5, 5, 10, 15 and 20 MHz.

Clock Synchronization in Wireless Networks 1. In traditional distributed systems, time servers can be easily and efficiently deployed. 2. Machines can contact each other, with relatively simple dissemination of information. 3. In sensor networks, nodes are resource constrained. 4. Also, multi-hop routing is expensive. 5. In addition, it is often important to optimize algorithms for energy consumption. 6. These and other observations have led to the design of very different clock synchronization algorithms for wireless networks.

Algorithm: H-Mac Protocol 1.TDMA approach for data collection in a Star Network Topology. 2.Using Heartbeat rhythm, H-Mac protocol maintains synchronization required for TDMA approach without using periodic control messages 3.H-Mac uses the peek to peek interval as time slot for data communication 4.Time slots assignment and frame cycles for synchronization are calculated by coordinator.

H-Mac Protocol Advantages 1. Using heartbeat rhythm for synchronization minimizes overall energy consumption. 2. H-MAC prolongs network life as compared to other protocols in Wireless Body Area Networks.

Future Work 1.Work towards coordination of movement or formation. There are various coordination tasks where clock synchronization mechanisms may be employed: Maybe some robots intend to move in a line, always maintaining identical distance, and passing messages. 2.In wireless sensor networks, the energy required for message transmission is very high. Hence, the clock synchronization algorithms are designed to to optimal and less energy consuming.

References 1.A. Rahim, N. Javaid, M. Aslam, Z. Rahman, U. Qasim, Z. A. Khan, "A Comprehensive Survey of MAC Protocols for Wireless Body Area Networks”. In: Seventh International conference on broadband and wireless computing, communications and applications, Andrew S. Tanenbaum, Maarten Van Steen, “Distributed Systems: Principles and Paradigms”, Prentice-Hall,NJ,USA. 3.Leslie Lamport, “Time, Clocks, and the Ordering of Events in a Distributed System”, In: Communications of the ACM, July 1978, Volume 21, Number 7, pp Mahmood. A, Ring. F, “Clock synchronization for IEEE based wired-wireless hybrid networks using PTP”. In: International IEEE Symposium, 2012, pp. 1-6.

Thank you!