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

Similar documents
Distributed Systems. Communica3on and models. Rik Sarkar 2015/2016. 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

ECE 158A: Lecture 13. Fall 2015

Multiple Access Links and Protocols

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

DD2451 Parallel and Distributed Computing --- FDD3008 Distributed Algorithms

Chapter 5: Link layer

Networks and Distributed Systems. Sarah Diesburg Operating Systems CS 3430

CS610- Computer Network Solved Subjective From Midterm Papers

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

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

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

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

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

Link Layer: Retransmissions

Data Link Layer: Overview, operations

Outline: Connecting Many Computers

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

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

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

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

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

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

Media Access Control. Networked Systems (H) Lecture 5

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

NFS. CSE/ISE 311: Systems Administra5on

Distributed Systems. Multicast and Agreement

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

Links. CS125 - mylinks 1 1/22/14

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

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

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

Data Link Layer: Multi Access Protocols

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

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


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

Chapter 5 Link Layer and LANs

CS 3640: Introduction to Networks and Their Applications

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

Computer Networks. Shyam Gollakota

Goals of Today s Lecture. Adaptors Communicating

Network Protocols. Sarah Diesburg Operating Systems CS 3430

Media Access Control in Ad Hoc Networks

Missing pieces + Putting the pieces together

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

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

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

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

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

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

Chapter 8 OSI Physical Layer

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

STEVEN R. BAGLEY PACKETS

Chapter 12 Multiple Access 12.1

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

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

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

Subject: Adhoc Networks

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

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

Chapter 16 Networking

MAC LAYER. Murat Demirbas SUNY Buffalo

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

CSC 4900 Computer Networks: The Link Layer

networks2.pdf September 8,

CSE/EE 461 Wireless and Contention-Free Protocols

PROCESS SYNCHRONIZATION

CS 3640: Introduction to Networks and Their Applications

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

CS144 An Introduc8on to Computer Networks

Reliable transmission

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

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

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

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

MODELS OF DISTRIBUTED SYSTEMS

CSE 461: Multiple Access Networks. This Lecture

Wireless and Mobile Networks

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

Link Layer. (continued)

UNIT IV -- TRANSPORT LAYER

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Address and Switching in the Link Layer

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

Introduction to Internetworking

User Datagram Protocol

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

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

Random Assignment Protocols

EE 122: Ethernet and

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 20: Networks and Distributed Systems

MODELS OF DISTRIBUTED SYSTEMS

Transcription:

Distributed Systems Communica3on and models Rik Sarkar Spring 2018 University of Edinburgh

Models Expecta3ons/assump3ons about things Every idea or ac3on anywhere is based on a model Determines what can or cannot happen 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 3

Packets Networks communicate data in messages of fixed (bounded) size called packets More data requires more packets Number of messages or packets transmiwed is a measure of communica3on used 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 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 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 7

Medium access Wireless: more complicated Hidden terminal problem More complex protocol using acks 8

Our models of LAN 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 9

Real life networks LANs connected by routers Routers Ethernet/Wifi Point to Point Ethernet/Wifi 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 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 12

Rou3ng Real rou3ng is more complicated With more than one path to a des3na3on, backups etc 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 14

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 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 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 17

Network stack Each layer solves a different distributed problem Form wikipedia 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 19

Blocking and non-blocking communica3on Blocking communica3on Sender sends message, waits un3l receiver replies Does not do anything in the mean 3me Non blocking communica3on Sender sends message, then con3nues its own work without wai3ng When receiver replies, or some other message arrives, node interrupts current work to handle message Some3mes these are called synchronous/ asynchronous, but we will try not to use that 20

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 21

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 22

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) 23

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 24

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 25

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 26

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) 27

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) 28

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

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 30

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 31

Modeling distributed systems Many possibili3es Choose your assump3ons carefully for your problem Pay close awen3on 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 32

33