Distributed Systems. Communica3on and models. Rik Sarkar 2015/2016. University of Edinburgh

Similar documents
Distributed Systems. Communica3on and models. Rik Sarkar Spring University of Edinburgh

Conges'on. Last Week: Discovery and Rou'ng. Today: Conges'on Control. Distributed Resource Sharing. Conges'on Collapse. Conges'on

Lecture 19. Principles behind data link layer services Framing Multiple access protocols

ECE 4450:427/527 - Computer Networks Spring 2017

Multiple Access Links and Protocols

DD2451 Parallel and Distributed Computing --- FDD3008 Distributed Algorithms

ECE 158A: Lecture 13. Fall 2015

Chapter 5: Link layer

The Link Layer and LANs. Chapter 6: Link layer and LANs

Homework 1. Question 1 - Layering. CSCI 1680 Computer Networks Fonseca

Mul$media Streaming. Digital Audio and Video Data. Digital Audio Sampling the analog signal. Challenges for Media Streaming.

Networks and Distributed Systems. Sarah Diesburg Operating Systems CS 3430

1-1. Switching Networks (Fall 2010) EE 586 Communication and. November 8, Lecture 30

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

Outline. Introduction to Networked Embedded Systems - Embedded systems Networked embedded systems Embedded Internet - Network properties

CS 3640: Introduction to Networks and Their Applications

Data Link Layer: Overview, operations

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

CS610- Computer Network Solved Subjective From Midterm Papers

Outline: Connecting Many Computers

Links. CS125 - mylinks 1 1/22/14

Lecture 6. Data Link Layer (cont d) Data Link Layer 1-1

Distributed Systems. Multicast and Agreement

Data Link Layer: Multi Access Protocols

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

Lecture 8 The Data Link Layer part I. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Link Layer: Retransmissions

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

Chapter 5 Link Layer and LANs

P2 A networking program usually has two programs, each running on a different host, communica9ng with each other. The program that ini9ates the

NFS 3/25/14. Overview. Intui>on. Disconnec>on. Challenges

Goals of Today s Lecture. Adaptors Communicating

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

Media Access Control in Ad Hoc Networks

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 16

1/10/16. RPC and Clocks. Tom Anderson. Last Time. Synchroniza>on RPC. Lab 1 RPC

NFS. CSE/ISE 311: Systems Administra5on

Medium Access Control. IEEE , Token Rings. CSMA/CD in WLANs? Ethernet MAC Algorithm. MACA Solution for Hidden Terminal Problem

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control

Link Layer and LANs. CMPS 4750/6750: Computer Networks

IEEE , Token Rings. 10/11/06 CS/ECE UIUC, Fall

19: Networking. Networking Hardware. Mark Handley

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

CSCI 1800 Cybersecurity and Interna4onal Rela4ons. Design and Opera-on of the Internet John E. Savage Brown University

Network Protocols. Sarah Diesburg Operating Systems CS 3430

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Department of EECS - University of California at Berkeley EECS122 - Introduction to Communication Networks - Spring 2005 Final: 5/20/2005

CS 455/555 Intro to Networks and Communications. Link Layer

Media Access Control. Networked Systems (H) Lecture 5

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Missing pieces + Putting the pieces together

CSC 4900 Computer Networks: The Link Layer

bitcoin allnet exam review: transport layer TCP basics congestion control project 2 Computer Networks ICS 651

Chapter 8 OSI Physical Layer

Subject: Adhoc Networks

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Computer Networks. Shyam Gollakota

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061/1110. Lecture 8. Medium Access Control Methods & LAN

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit)

Vorlesung Kommunikationsnetze Research Topics: QoS in VANETs

CS 3640: Introduction to Networks and Their Applications

Jaringan Komputer. Broadcast Network. Outline. MAC (Medium Access Control) Channel Allocation Problem. Dynamic Channel Allocation

Chapter 12 Multiple Access 12.1

Physical Layer. Medium Access Links and Protocols. Point-to-Point protocols. Modems: Signaling. Modems Signaling. Srinidhi Varadarajan

Introduction to Wireless Networking CS 490WN/ECE 401WN Winter Lecture 4: Wireless LANs and IEEE Part II

THE TRANSPORT LAYER UNIT IV

Wireless and Mobile Networks Reading: Sections 2.8 and 4.2.5

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

IP Packet Switching. Goals of Todayʼs Lecture. Simple Network: Nodes and a Link. Connectivity Links and nodes Circuit switching Packet switching

Reminder: Datalink Functions Computer Networking. Datalink Architectures

CHAPTER 7 MAC LAYER PROTOCOLS. Dr. Bhargavi Goswami Associate Professor & Head Department of Computer Science Garden City College

Topics. Link Layer Services (more) Link Layer Services LECTURE 5 MULTIPLE ACCESS AND LOCAL AREA NETWORKS. flow control: error detection:

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

Contention Protocols and Networks

MAC LAYER. Murat Demirbas SUNY Buffalo


STEVEN R. BAGLEY PACKETS

A MAC protocol for Reliable Broadcast Communica7ons in Wireless Network- on- Chip

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

Distributed Systems Leader election & Failure detection

networks2.pdf September 8,

Network Security: Broadcast and Multicast. Tuomas Aura T Network security Aalto University, Nov-Dec 2010

EE 122: Ethernet and

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Link Layer. w/ credit to Rick Graziani (Cabrillo) for some of the anima<ons

CSE/EE 461 Wireless and Contention-Free Protocols

Silberschatz and Galvin Chapter 15

CSCI Computer Networks

Distributed Algorithms. Partha Sarathi Mandal Department of Mathematics IIT Guwahati

Address and Switching in the Link Layer

Random Access. 1. Aloha. 2. Slotted Aloha 3. CSMA 4. CSMA/CD

Chapter 16 Networking

Random Assignment Protocols

CSE 461: Multiple Access Networks. This Lecture

PROCESS SYNCHRONIZATION

COMPUTER NETWORK Model Test Paper

MODELS OF DISTRIBUTED SYSTEMS

Intro to LAN/WAN. Transport Layer

CS132/EECS148 - Instructor: Karim El Defrawy Midterm Spring 2013 Time: 1hour May 2nd, 2013

Transcription:

Distributed Systems Communica3on and models Rik Sarkar 2015/2016 University of Edinburgh

Models Expecta3ons/assump3ons about things Every idea or ac3on anywhere is based on a model Determines what can or cannot happen Distributed Systems, Edinburgh, 2014 2

Communica3on & modeling Modeling distributed systems: How we can think about them Communica3on between nearby nodes Communica3on between distant nodes Communica3on with many nodes Some terminology: One to all : Broadcast All: in some set of interest One to one: point to point Distributed Systems, Edinburgh, 2014 3

Packets Networks communicate data in messages of fixed (bounded) size called packets More data requires more packets Number of messages or packets transmized is a measure of communica3on used Distributed Systems, Edinburgh, 2014 4

Local area networks Medium: Broadcast Message goes from one computer to all other computers (restricted to some set) For example, all other computers in the LAN, or some other system in considera3on Ethernet LAN is a broadcast medium All computers are connected to a wire. They transmit messages on the wire and all can receive Wireless LAN (WiFi) is a broadcast medium Electromagne3c waves is the common medium Distributed Systems, Edinburgh, 2014 5

Local area networks Advantages: Sending a common message to everyone is easy Finding des3na3on is easy Message goes to everyone Just have a des3na3on field Main issue: Medium access Since medium is broadcast, two people transmiang at the same 3me garbles message Distributed Systems, Edinburgh, 2014 6

Medium access Only one transmission at a 3me can be allowed Mutual exclusion problem (shared resource of communica3on wire) We cannot use messages to solve it Protocols: TDMA: Everyone has a periodic slot CSMA: See if anyone else is transmiang. If so, defer. Usually acks are also used to ensure transmission Retransmit if necessary Bandwidth reduces with number of nodes trying to transmit. One LAN should not have too many nodes Distributed Systems, Edinburgh, 2014 7

Medium access Wireless: more complicated Hidden terminal problem More complex protocol using acks Distributed Systems, Edinburgh, 2014 8

Our models Graph: Every node has an edge to every other We ofen assume that to send a message (packet) to a node on the same network takes one unit of 3me (or, at most a constant) This may not be true if there can be many nodes in the same LAN But usually the number is not very large Distributed Systems, Edinburgh, 2014 9

Real life networks LANs connected by routers Routers Ethernet/Wifi Point to Point Ethernet/Wifi Distributed Systems, Edinburgh, 2014 10

Rou3ng Finding a path in the network Every node has a rou3ng table Equivalent to a BFS tree for every node 1 3 2 3 2 2 1 1 2 2 3 3 3 3 4 4 5 5 4 3 1 5 3 5 4 4 3 1 4 2 4 3 4 4 4 5 2 1 1 3 3 4 3 5 3 Distributed Systems, Edinburgh, 2014 11

Rou3ng: Distributed search for a path Smaller rou3ng tables by combining addresses Used in IP (Internet) rou3ng Smaller rou3ng tables are preferable 1 1 2 2 2 2 3-5 3 4-5 4 1 3 1-3 3 5 5 1-4 4 4 5 2 1 1 3-5 3 Distributed Systems, Edinburgh, 2014 12

Rou3ng Real rou3ng is more complicated With more than one path to a des3na3on, backups etc Distributed Systems, Edinburgh, 2014 13

Related: Loca3on based rou3ng Geographical rou3ng uses a node s loca3on to discover path to that node. y x Greedy Rou3ng: Forward to the neighbor that is nearest to the des3na3on Distributed Systems, Edinburgh, 2014

Large networks Communica3on is typically point- to- point using rou3ng Broadcast is not automa3c If we need broadcast, we will have to arrange a flood (or some other method) Routers Ethernet/Wifi Point to Point Ethernet/Wifi Distributed Systems, Edinburgh, 2014 15

Transport management UDP: Send a packet, hope that the network routes and delivers it, in 3me No Sequence number Not necessarily FIFO Useful in streaming audio/video. Not for important data. TCP: Send a packet (or few packets) Packets have sequence number FIFO If no acks arrive, resend packets If no acks are found afer many tries, return error Distributed Systems, Edinburgh, 2014 16

TCP Does distributed conges3on control When packets don t get delivered, TCP slows down the stream Assump3on: routers drop packets when there are too many Difficulty Acks may not arrive due to other factors Some connec3on failed temporarily User moved from one network to another Distributed Systems, Edinburgh, 2014 17

Network stack Each layer solves a different distributed problem Form wikipedia Distributed Systems, Edinburgh, 2014 18

Communica3on: Overlay network We may some3mes ignore parts of the network Nodes that carry messages but do not directly par3cipate eg. routers Or edges that exist but we are not using Or we don t know about Ofen used in peer- to- peer networks Not every node knows all other nodes in the network But communicates to known nodes through rou3ng Distributed Systems, Edinburgh, 2014 19

Computa3on Synchronous: Opera3on in rounds In a round, a node performs some computa3on, and then sends some messages All messages sent at the end of round x are available to recipients at start of round x+1 But not earlier Computa3on Communica3on Round 1 Round 2 Round 3 20

Communica3on Synchronous Can be implemented if message transmission 3me is bounded by some constant say m Computa3on 3mes for all nodes are bounded by some constant c Clocks are synchronized (sufficiently) Then set each round to be m+c in dura3on Distributed Systems, Edinburgh, 2014 21

Asynchronous Communica3on No synchroniza3on or rounds Nodes compute at different and arbitrary speeds Messages proceed at different speeds: may be arbitrarily delayed, may be received at any 3me Worst case model No assump3on about speeds of processes or channel (But does not include communica3on/computa3on errors) Distributed Systems, Edinburgh, 2014 22

Asynchronous Communica3on Harder to manage Message can arrive at any 3me afer being sent, must be handled suitably Possible to make some simplifying assump3ons E.g.: Channels are FIFO: order of messages on a channel are preserved Some code blocks are atomic (not interrupted by messages) Either communica3on or computa3on 3mes bounded Distributed Systems, Edinburgh, 2014 23

Synchronous communica3on in Real systems Synchronous communica3on can be a fair model Modern computers and networks are fast (though not arbitrarily fast) Easier to design algorithms and analyze Well designed algorithms are faster and more efficient Ofen can be adapted to asynchronous systems Ofen a star3ng point for design Distributed Systems, Edinburgh, 2014 24

Failures Nodes may fail Hardware failure Run out of energy or power failure Sofware failure (crash) Permanent Temporary (what happens when it restarts? Recovers the state? Starts from ini3al state?) Model depends on system. E.g. different types of failures occur with corresponding probabili3es Distributed Systems, Edinburgh, 2014 25

Node failures Common abstract models Stopping failure: node just stops working May need assump3ons about which computa3on/communica3on it finishes before stopping May need assump3on about neighbors knowing of failure Byzan3ne failure: node behaves as an adversary Imagine your enemy has taken control of the node Is trying to spoil your computa3on Nodes may fail individually E.g. each node fails with probability p Nodes may have correlated failure E.g. all nodes fail in a region (data center, sensor field) Distributed Systems, Edinburgh, 2014 26

Link/communica3on failure May be temporary/permanent May happen due to Hardware failure Noise: electronic devices (microwaves etc) may transmit radio waves at similar frequencies and disrupt communica3on Interference: Other communica3ng nodes nearby may disrupt communica3on Effects Channel silent and unusable (hardware failure) Channel ac3ve, but unusable due to noise and interference Channel ac3ve, but may contain erroneous message (may be detected by error correc3ng codes) Distributed Systems, Edinburgh, 2014 27

Security Issues: Unauthorized access, modifica3on. Making systems unavailable (DOS) AZack on one or more nodes Causing to it fail Read data Taking control to read future data, disrupt opera3on AZack on communica3on links/channel Block communica3on Read data in the channel (easy in wireless without encyp3on) Corrupt data in the channel Distributed Systems, Edinburgh, 2014 28

Security Solu3ons usually have specific assump3ons of what the adversary can do E.g. If adversary has access to channel Cryptography may be able to prevent reading/ corrup3ng data Distributed Systems, Edinburgh, 2014 29

Mobility Movement makes it harder to design distributed systems Communica3on is difficult Delays, lost messages Edge weights can change Applica3ons that depend on loca3on must adapt to movement How do people move? What is a model of movement? Not yet well understood Distributed Systems, Edinburgh, 2014 30

Modeling distributed systems Many possibili3es Choose your assump3ons carefully for your problem Pay close azen3on to what is known about communica3on/network Start with simpler models Usually more assump3ons, fewer parameters See what can be achieved Then try to drop/relax assump3ons Distributed Systems, Edinburgh, 2014 31

Distributed Systems, Edinburgh, 2014 32