Distributed systems. distributed systems and protocols distributed systems: use components located at networked computers use message-passing to coordinate.

Slides:



Advertisements
Similar presentations
CS542 Topics in Distributed Systems Diganta Goswami.
Advertisements

CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Kademlia: A Peer-to-peer Information System Based on the XOR Metric Petar Mayamounkov David Mazières A few slides are taken from the authors’ original.
CHORD – peer to peer lookup protocol Shankar Karthik Vaithianathan & Aravind Sivaraman University of Central Florida.
Node Lookup in Peer-to-Peer Network P2P: Large connection of computers, without central control where typically each node has some information of interest.
Technische Universität Chemnitz Kurt Tutschku Vertretung - Professur Rechner- netze und verteilte Systeme Chord - A Distributed Hash Table Yimei Liao.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Speaker: Cathrin Weiß 11/23/2004 Proseminar Peer-to-Peer Information Systems.
1 1 Chord: A scalable Peer-to-peer Lookup Service for Internet Applications Dariotaki Roula
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Peer-to-Peer Distributed Search. Peer-to-Peer Networks A pure peer-to-peer network is a collection of nodes or peers that: 1.Are autonomous: participants.
1 Algorithms and protocols for distributed systems We have defined process groups as having peer or hierarchical structure and have seen that a coordinator.
Page 1 Mutual Exclusion* Distributed Systems *referred to slides by Prof. Paul Krzyzanowski at Rutgers University and Prof. Mary Ellen Weisskopf at University.
Distributed Systems Spring 2009
CS 582 / CMPE 481 Distributed Systems
What we will cover…  Distributed Coordination 1-1.
Ordering and Consistent Cuts Presented By Biswanath Panda.
CMPT 431 Dr. Alexandra Fedorova Lecture VIII: Time And Global Clocks.
Distributed Systems Fall 2009 Logical time, global states, and debugging.
Topics in Reliable Distributed Systems Lecture 2, Fall Dr. Idit Keidar.
Concurrency CS 510: Programming Languages David Walker.
Chord: A Scalable Peer-to-Peer Lookup Protocol for Internet Applications Stoica et al. Presented by Tam Chantem March 30, 2007.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 9: Time, Coordination and Replication Dr. Michael R. Lyu Computer.
Chapter 18: Distributed Coordination (Chapter 18.1 – 18.5)
Topics in Reliable Distributed Systems Fall Dr. Idit Keidar.
Wide-area cooperative storage with CFS
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.
1DT066 D ISTRIBUTED I NFORMATION S YSTEM Time, Coordination and Agreement 1.
CIS 720 Distributed algorithms. “Paint on the forehead” problem Each of you can see other’s forehead but not your own. I announce “some of you have paint.
1 Distributed Systems CS 425 / CSE 424 / ECE 428 Global Snapshots Reading: Sections 11.5 (4 th ed), 14.5 (5 th ed)  2010, I. Gupta, K. Nahrtstedt, S.
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
Multi-level Hashing for Peer-to-Peer System in Wireless Ad Hoc Environment Dewan Tanvir Ahmed and Shervin Shirmohammadi Distributed & Collaborative Virtual.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Chord & CFS Presenter: Gang ZhouNov. 11th, University of Virginia.
1 Reading Report 5 Yin Chen 2 Mar 2004 Reference: Chord: A Scalable Peer-To-Peer Lookup Service for Internet Applications, Ion Stoica, Robert Morris, david.
Operating Systems Distributed Coordination. Topics –Event Ordering –Mutual Exclusion –Atomicity –Concurrency Control Topics –Event Ordering –Mutual Exclusion.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Coordination and Agreement. Topics Distributed Mutual Exclusion Leader Election.
1 Distributed Process Management Chapter Distributed Global States Operating system cannot know the current state of all process in the distributed.
Node Lookup in P2P Networks. Node lookup in p2p networks In a p2p network, each node may provide some kind of service for other nodes and also will ask.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
Distributed Systems Fall 2010 Logical time, global states, and debugging.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
1. Outline  Introduction  Different Mechanisms Broadcasting Multicasting Forward Pointers Home-based approach Distributed Hash Tables Hierarchical approaches.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 2: Distributed Hash.
D u k e S y s t e m s Asynchronous Replicated State Machines (Causal Multicast and All That) Jeff Chase Duke University.
Physical clock synchronization Question 1. Why is physical clock synchronization important? Question 2. With the price of atomic clocks or GPS coming down,
Distributed Systems Topic 5: Time, Coordination and Agreement
Election Distributed Systems. Algorithms to Find Global States Why? To check a particular property exist or not in distributed system –(Distributed) garbage.
Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
Lecture 12-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) October 4, 2012 Lecture 12 Mutual Exclusion.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
05/11/2011ecs251 spring 2011, midterm1 ecs251 Spring 2011 midterm Name: Student ID: Open book/laptop/Internet and totally 10 questions (choose at.
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
CSE 486/586 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
Distributed Mutual Exclusion Synchronization in Distributed Systems Synchronization in distributed systems are often more difficult compared to synchronization.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
The Principles of Operating Systems Chapter 9 Distributed Process Management.
Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications * CS587x Lecture Department of Computer Science Iowa State University *I. Stoica,
The Chord P2P Network Some slides taken from the original presentation by the authors.
Distributed Systems Lecture 6 Global states and snapshots 1.
Distributed Mutex EE324 Lecture 11.
Time And Global Clocks CMPT 431.
Outline Distributed Mutual Exclusion Introduction Performance measures
Non-Distributed Excercises
CSE 486/586 Distributed Systems Mutual Exclusion
Lecture 8 Processes and events Local and global states Time
Distributed Systems and Concurrency: Synchronization in Distributed Systems Majeed Kassis.
COT 5611 Operating Systems Design Principles Spring 2014
Kademlia: A Peer-to-peer Information System Based on the XOR Metric
Presentation transcript:

distributed systems

distributed systems and protocols distributed systems: use components located at networked computers use message-passing to coordinate computations distributed system characteristics  concurrency of components  no global clock  components fail independently asynchronous protocols process knows nothing after sending message synchronous protocols paired request and reply (whiteboard diagram)‏

remote procedure call (RPC)‏ class of synchronous protocols  process-to-process  may be implemented on or instead of UDP generic RPC functions: name space for remote procedures  flat: needs central authority  hierarchical: per machine, per process,... way to multiplex calls and replies  unique message IDs  boot IDs

additional RPC functions: reliable message delivery  ACKs, timeouts  multiple “channels”  concurrency of “open” messages  no “in-order” guarantee fragmentation and reassembly  avoid TCP overhead  no “sliding window”  ACKs & NACKs

Lamport's logical clocks operated per process monotonically increasing time counter typically integer, incremented at each event Lamport timestamps event e; process p i ; L i (e); happened-before relation: → rule LC1: increment L i (e) prior to e i rule LC2:  to message m, append time t = L i  [process p j receives message (m,t)]: p j does:  compute L j := max(L j, t)‏  apply LC rule 1  timestamp event e: receive(m)‏

global state distributed garbage collection garbage: not referenced within system communication channels, too distributed deadlock detection waits-for relationship distributed termination detection communication channels, too

run: total ordering of all events in global history, consistent with each local history ordering → i, for (i=1,2,...,n)‏ linearization (consistent run): a run that is consistent with the → relation on the global history global state predicate: maps domain of global process state to {T,F} stable (garbage, deadlock, termination)‏ unstable (ongoing)‏

safety and liveness safety: deadlock is an undesirable predicate P S 0 is system initial state we want P to evaluate to False for all states liveness: termination is a desirable predicate P' for any linearization L, P' evaluates to True, for some state reachable from S 0

shared resources critical section (CS) problem: resource shared by distributed processes solution based solely on message passing mutual exclusion solution: requirements ME1 (safety): <= 1 process executing in CS ME2 (liveness): process requests to enter/exit CS eventually succeed

mutual exclusion mutex (mutual exclusion object): resource shared by distributed processes two states: {locked, unlocked} arbitration/scheduling: FIFO, priority,... fairness absence of starvation ordering of process entry to CS  who gets the lock next? but, no global clocks... and, recall deadlock problem ME3 (→ ordering): entry to CS is granted in → order

peer-to-peer node lookup distributed index of distributed resources example algorithm: Chord –each peer’s IP address hashed to m-bit key hash function is shared among peers text example: 160-bit keys some small fraction of keys appropriated for real nodes –linear ascending search (modulo 2 m )‏ effectively, a circle of 2 m keys –for k, some key successor(k) := key of next actual node of greater key

Chord lookup index stored materials by resource name: –hash(name) => key –send (name, file-IP-address) tuple to node(successor(hash(name)))‏ find/retrieve materials by resource name: –hash(name) => key –contact successor(hash(name))‏ ask for (name, file-IP-address) tuple may be multiple records –ask file-IP-address for name materials

Chord infrastructure each participating node n –stores IP address of node(successor(key-of-n))‏ –may also store IP address of predecessor –set of resource records submitted by peers {(name, file-IP-address)} –“finger table” for node k m entries: 0,..., (m-1)‏ {(start i, IP-address(successor(start i )))} –start i = (k + 2 i ) mod 2 m

Chord lookup example idea: resource advertiser (repository) and resource searcher both hash resource name to one index key search by sending packet around circle without finger tables, n/2 average lookups –pure linear search with finger tables, log 2 n lookups –binary indexing –finger closest predecessor of key(name)‏ look up key 3 at node 1 look up key 14 at node 1 look up key 16 at node 1 search can start anew further around the circle search over: node knows the key sought is between itself and its successor; the node returns successor IP address