Naming CSCI 4780/6780. Attribute-based Naming Flat and structured names provide location transparency Structured names are also human-friendly Increasingly,

Slides:



Advertisements
Similar presentations
Synchronization.
Advertisements

Time in Distributed Systems
Distributed Systems CS Synchronization Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Time and Clock Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Distributed Systems Spring 2009
Time in Embedded and Real Time Systems Lecture #6 David Andrews
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.
Teaching material based on Distributed Systems: Concepts and Design, Edition 3, Addison-Wesley Copyright © George Coulouris, Jean Dollimore, Tim.
Synchronization Clock Synchronization Logical Clocks Global State Election Algorithms Mutual Exclusion.
Time and Global States Chapter 11. Why time? Time is an Important and interesting issue in distributes systems. One we can measure accurately. Can use.
Distributed Systems CS Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
Synchronization in Distributed Systems. Mutual Exclusion To read or update shared data, a process should enter a critical region to ensure mutual exclusion.
1 CLOCK SYNCHRONIZATION " Synchronization in distributed systems is more complicated than in centralized ones because the former have to use distributed.
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.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
1 Synchronization Part 1 REK’s adaptation of Claypool’s adaptation of Tanenbaum’s Distributed Systems Chapter 5.
Physical Clocks.
Synchronization Chapter 6 Part I Clock Synchronization & Logical clocks Part II Mutual Exclusion Part III Election Algorithms Part IV Transactions.
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.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 6 Synchronization.
Synchronization in Distributed Systems Chapter 6.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Naming Name distribution: use hierarchies DNS X.500 and LDAP.
Parallel and Distributed Simulation Synchronizing Wallclock Time.
Computer Science Lecture 9, page 1 CS677: Distributed OS Last Class: Naming Name distribution: use hierarchies DNS Iterative versus Recursive name resolution.
Synchronization CSCI 4900/6900. Importance of Clocks & Synchronization Avoiding simultaneous access of resources –Cooperate to grant exclusive access.
Synchronization. Why we need synchronization? It is important that multiple processes do not access shared resources simultaneously. Synchronization in.
Synchronization Chapter 5. Outline 1.Clock synchronization 2.Logical clocks 3.Global state 4.Election algorithms 5.Mutual exclusion 6.Distributed transactions.
Communication & Synchronization Why do processes communicate in DS? –To exchange messages –To synchronize processes Why do processes synchronize in DS?
Distributed Systems Principles and Paradigms Chapter 05 Synchronization.
1 Clock Synchronization & Mutual Exclusion in Distributed Operating Systems Brett O’Neill CSE 8343 – Group A6.
Synchronization Distributed System. Why synchronization? Two sharpshooters in a multiplayer online game kill the same target. Which one gets the points?
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.
CLOCK SYNCHRONIZATION SUSMITHA KOTA 21- SEP-2015.
Synchronization CSCI 4900/6900. Importance of Clocks & Synchronization Avoiding simultaneous access of resources –Cooperate to grant exclusive access.
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
Distributed Systems Topic 5: Time, Coordination and Agreement
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Attribute based Naming
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.
Synchronization Chapter 5. Clock Synchronization When each machine has its own clock, an event that occurred after another event may nevertheless be assigned.
Hwajung Lee. Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
Synchronization Chapter 5. Clock Synchronization When each machine has its own clock, an event that occurred after another event may nevertheless be assigned.
Lecture on Synchronization Submitted by
Synchronization in Distributed Systems In a single CPU system, critical regions, mutual exclusion and other synchronization problems are generally solved.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Proof of liveness: an example
Prof. Leonardo Mostarda University of Camerino
Distributed Computing
CSC 8320 Advanced Operating Systems Spring 2006
Time and Clock.
Time and Clock.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Distributed Systems CS
Distributed Systems CS
Chapter 5 (through section 5.4)
Chap 5 Distributed Coordination
Last Class: Naming Name distribution: use hierarchies DNS
Outline Theoretical Foundations
Presentation transcript:

Naming CSCI 4780/6780

Attribute-based Naming Flat and structured names provide location transparency Structured names are also human-friendly Increasingly, users and application want to locate for resources based on features, contents, characteristics Web search P2P search

Attribute-based Naming Describe entities as (attribute, value) pairs Queries specify constraints on attributes In P2P music search: Title = “Four seasons” Composer = “Vivaldi” Orchestra = “Royal Philharmonic”

Directory Services Naming systems for attribute-based names Entities associated with a set of attributes that are searchable Resource description framework (RDF) Triplet consisting of (subject, predicate, object) Subjects, predicates and objects can themselves be resources Obtain information about subject using predicates and objects RDFs can be implemented in a distributed fashion, but costs can be quite high

LDAP Lightweight Directory Access Protocol Hierarchical implementation Combines structured naming and attribute-based naming Consists of number of records Collection of (attribute, value) pairs Single-valued and multiple-valued attributes Directory Information Base (DIB) – Collection of directory entries Relative Distinguished Name /C=NL/O=Vrije Universiteit/OU=Comp. sc.

LDAP Directory Entry

Directory Information Tree

LDAP Two directory entries having Host_Name as RDN.

Lookups in LDAP Read – Reads a particular entry List – Lists all outgoing edges from a node LDAP implementation is similar to DNS implementation Supports richer sets of queries Search(“&(C=NL)(O=Vrije Universiteit)(OU=*)(CN = Main Server) Searching is expensive Research on DHT-based implementation of attribute-based naming

Synchronization CSCI 4780/6780

Importance of Clocks & Synchronization Avoiding simultaneous access of resources –Cooperate to grant exclusive access for small durations Process may need to agree upon ordering of events –First person to complete assignment will receive bonus –How to infer who completed first? Synchronization & ordering is difficult in distributed setting

Chapter Outline Actual time-based synchronization –Physical clocks –Synchronizing multiple clocks Relative ordering-based synchronization –Logical clocks, Lamport’s algorithm, Vector time stamps Global state Leader election algorithms (time permitting) Mutual exclusion in distributed systems Distributed transactions

Clocks in Systems Notion of time in centralized system is unambiguous –Do a system call to get current time Important property of time – Always moves forward –If B executes the system call after A, B will never get a lower value Many system operations need some notion of time for correctness Example – “Make” program in Unix –Re-compiles only files that were changed since last compilation –What happens when there is no global agreement on time?

Clock Synchronization When each machine has its own clock, an event that occurred after another event may nevertheless be assigned an earlier time.

System Clocks & Clock Skew Almost all computers have clocks (timers) A precisely cut quartz crystal kept under tension –Oscillates at a well-defined frequency Two registers – Counter & holding register –Each oscillation of crystal decrements counter by 1 –Interrupt when counter is zero & reload from holding reg. –Each interrupt is a tick Clocks at multiple CPUs cannot be guaranteed to oscillate at exact same frequency Difference between various clocks – Clock Skew

How is Time Actually Measured? Solar time – Based on earth’s rotation –Transit of sun: Sun reaching the highest apparent in sky –Solar day: Time b/w two consecutive sun transits –Solar second: 1/86400 th of a solar day –Mean solar second: 1/86400 th of a mean solar day Atomic time –Second: Time for cesium-133 atom to make 9,192,631,770 transitions –International atomic time (TAI) Leap seconds to resolve difference b/w TAI & solar time (UTC) NIST broadcasts UTC on radio station (WWV)

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.

Clock Synchronization Algorithms Two related problems –If one machine has WWV receiver: synchronize all machines to machine with the WWV receiver –No WWV receiver: Keep all machines relatively synchronized Many algorithms with some key assumptions –Each machine has timer that causes interrupt H times/sec –Increments software clock on each interrupt –C p (t) indicates clock value when UTC time is t –In ideal world dC/dt = 1

Drift & Max. Drift Rate The relation between clock time and UTC when clocks tick at different rates. In real world dC/dt is not one Maximum drift rate: ρ such that 1- ρ ≤ dC/dt ≤ 1 + ρ –Specified by manufactures

Clock Synchronization Algorithms Two clocks drifting from UTC in opposite directions at rate of ρ need to be synchronized every δ/2ρ secs. Christian’s Algorithm: –Suited when one machine has WWV receiver –Each machine sends a request to time server periodically (period < δ/2ρ ) seconds –Time server responds with its current time (C UTC ) Simple scheme –Set receivers time to C UTC –Two problems Clock might run backward !!! Doesn’t consider processing time

Cristian's Algorithm Introduce change gradually – Reduce time by a small amount (T 2 – T 1 ) + (T 4 - T 3 ) θ = T T 4 2