Socket Programming. Daniel Zappala. CS 360 Internet Programming Brigham Young University

Size: px
Start display at page:

Download "Socket Programming. Daniel Zappala. CS 360 Internet Programming Brigham Young University"

Transcription

1 Socket Programming Daniel Zappala CS 360 Internet Programming Brigham Young University

2 Sockets, Addresses, Ports

3 Clients and Servers 3/33 clients request a service from a server using a protocol need an API for sending and receiving data need an abstraction for the Internet a reliable connection: TCP an unreliable message service: UDP these are provided by the BSD socket API

4 Processes and Sockets 4/33 inter-process communication uses messages sent on sockets socket API defines how to open, close, read, and write to socket which transport protocol to use various communication parameters

5 Socket API 5/33 BSD Socket API - the dominant socket API on Linux, BSD, Windows Use the man pages! shows C syntax, with include files gives a description of how the system call works lists return values lists errors lists other relevant man pages man man man socket the socket API is in section 2 of the manual, so you will need to specify the section if the same command exists in an earlier section: man 2 bind

6 Addresses and Ports 6/33 to talk to a process on another machine, you need to identify it IP address: identifies the machine port number: identifies the socket the process is using

7 IP Addresses 7/33 IPv4 address identifies an interface/link on a host or router 32 bits dotted-decimal notation: each part is 8 bits

8 Ports 8/33 identifier for a socket on which a process is listening 16 bits a process may listen on more than one socket; each must be on a separate port Operating systems (such as Linux) designate some ports as privileged, meaning only the superuser can listen on them (typically ports less than 1024) To help find common servers, the IANA designates well-known ports for many protocols HTTP: 80 SMTP: 25 SSH: 22 NTP: 123

9 ClientAPI

10 Client API 10/33 1 socket(): create a socket endpoint 2 connect(): connect to a server 3 send(): send data 4 recv(): receive data 5 close(): close the socket

11 Creating a Socket 11/33 1 i n t s o c k e t ( i n t domain, i n t type, i n t p r o t o c o l ) ; 2 3 domain = PF INET 4 t y p e = SOCK STREAM f o r TCP, SOCK DGRAM f o r UDP 5 p r o t o c o l = 0 on success returns a socket descriptor

12 Connecting to a Server 12/33 1 i n t c o n n e c t ( i n t sockfd, c o n s t s t r u c t s o c k a d d r s e r v a d d r, 2 s o c k l e n t a d d r l e n ) ; 3 4 s o c k f d = s o c k e t you c r e a t e d 5 s e r v a d d r = p o i n t e r to s o c k e t a d d r e s s s t r u c t u r e 6 s o c k l e n t = l e n g t h o f s o c k e t a d d r e s s connects to a server uses the socket address structure to pass an IP address and port on success returns zero on error returns -1 and sets errno

13 Sending and Receiving Data 13/33 usually the client sends a request to the server and the server sends a reply socket operations are similar to reading from and writing to a file a socket descriptor acts like a file handle sending writing receiving reading

14 Send and Receive Syntax 14/33 1 s s i z e t send ( i n t s, c o n s t v o i d buf, s i z e t len, i n t f l a g s ) ; 2 s s i z e t r e c v ( i n t s, v o i d buf, s i z e t len, i n t f l a g s ) ; s = socket buf = pointer to buffer len = size of buffer in bytes on success returns the number of bytes actually sent or received if it is less than what you expected, then you must repeat the system call until all data is sent or received recv() will return 0 if the socket has been closed on error returns -1 and sets errno see man pages for more advanced options

15 Closing a Socket 15/33 1 #i n c l u d e <u n i s t d. h> 2 3 i n t c l o s e ( i n t f d ) ; fd = socket on success returns zero on error returns -1 and sets errno releases the socket file descriptor so it can be re-used!

16 Example 16/33 See simple echo client on github. GitHub

17 Socket Addresses

18 Socket Addresses 18/33 to connect a socket, you must supply a socket address structure that includes the IP address and port of the server you are connecting to 1 use DNS to convert host name to IP address 2 initialize a socket address structure

19 Generic Socket Address Structure 19/33 1 s t r u c t s o c k a d d r { 2 s a f a m i l y t s a f a m i l y ; // a d d r e s s f a m i l y 3 c h a r s a d a t a [ 1 4 ] ; // a d d r e s s 4 } used to represent a generic connection between processes potentially provides access to many different addressing standards address family can be AF UNIX : local UNIX socket AF INET : Internet socket

20 IPv4 Socket Address Structure 20/33 1 s t r u c t s o c k a d d r i n { 2 s a f a m i l y t s i n f a m i l y ; // a d d r e s s f a m i l y 3 u i n t 1 6 t s i n p o r t ; // p o r t 4 s t r u c t i n a d d r s i n a d d r ; // I n t e r n e t a d d r e s s 5 c h a r s i n z e r o [ 8 ] ; // unused 6 } can cast IPv4 socket into a generic socket port is 2 bytes, address is 4 bytes, zero is 8 bytes = 14 bytes IPv4 address structure: 1 s t r u c t i n a d d r { 2 u i n t 3 2 t s a d d r ; // a d d r e s s 3 } ;

21 Network Byte Order 21/33 you must store the port and address in network byte order (most significant byte sent first) provides interoperability among Internet hosts use htons() for the port and inet aton, inet addr() or inet makeaddr() for the address 1 s t r u c t s o c k a d d r i n s e r v e r ; 2 s e r v e r. s i n p o r t = htons ( 8 0 ) ; 3 i f (! i n e t a t o n ( i p a d d r e s s,& s e r v e r. s i n a d d r ) ) 4 p r i n t f ( i n e t a d d r ( ) c o n v e r s i o n e r r o r \n ) ;

22 Example 22/33 See simple echo client on GitHub. GitHub

23 Server API

24 Server API 24/33 1 create a socket 2 bind: associate the socket with an address and port 3 listen: convert socket to listen for incoming connections 4 accept: accept an incoming client connection 5 send: send data 6 recv: receive data

25 Binding the Socket 25/33 1 i n t b i n d ( i n t sockfd, c o n s t s t r u c t s o c k a d d r my addr, 2 s o c k l e n t a d d r l e n ) ; 3 4 s o c k f d = s o c k e t you c r e a t e d 5 my addr = p o i n t e r to s o c k e t a d d r e s s s t r u c t u r e 6 a d d r l e n = l e n g t h o f s o c k e t a d d r e s s associates an address with a socket uses the socket address structure to pass an IP address and port on success returns zero, -1 and errno otherwise

26 Listening on the Socket 26/33 1 i n t l i s t e n ( i n t sockfd, i n t b a c k l o g ) ; 2 3 s o c k f d = s o c k e t you c r e a t e d and bound 4 b a c k l o g = maximum w a i t i n g c o n n e c t i o n s converts a socket to a passive socket (one that accepts connections rather than connecting) backlog is the maximum number of waiting connections the kernel should hold in a queue maximum value in Linux is 128 on success returns zero, -1 and errno otherwise

27 Accepting a Connection 27/33 1 i n t a c c e p t ( i n t sockfd, s t r u c t s o c k a d d r addr, 2 s o c k l e n t a d d r l e n ) ; 3 4 s o c k f d = s o c k e t you c r e a t e d and bound 5 addr = p o i n t e r to empty s o c k e t a d d r e s s s t r u c t u r e 6 a d d r l e n = l e n g t h o f empty s o c k e t a d d r e s s s t r u c t u r e accept a connection from a client; gets the next connection waiting in the queue if there are no pending connections, the process sleeps assuming this is a blocking socket (this is the default) on success returns a new socket descriptor on success, accept() fills in the address of the client

28 Example 28/33 See simple echo server on GitHub. GitHub

29 Parsing Messages

30 Example 30/33 Try simple echo client with slow echo server in the socket example code. GitHub

31 Parsing Messages 31/33 an application protocol reads and write messages, but TCP and the socket API use a byte stream when a client calls recv() there is no guarantee that it will get an entire message the application has to designate where a message starts and ends and then parse the byte stream looking for messages two options for reading a message 1 variable length: read until a sentinel (end-of-message marker) 2 known length: read a length field and then read the listed number of bytes you will need to write a read-until-sentinel() and read-fixed-length() methods for your socket programming labs

32 Sending and Receiving Properly 32/33 results of send() or recv() call 1 less than zero bytes, errno == EINTR the system call was interrupted try again 2 less than zero bytes, any other error fatal error try to recover gracefully 3 zero bytes the socket is closed try to recover gracefully 4 positive bytes the return value is the number of bytes sent or received use a send() or recv() loop!

33 Example 33/33 See echo server and client on GitHub. GitHub

Concurrent HTTP Proxy Server. CS425 - Computer Networks Vaibhav Nagar(14785)

Concurrent HTTP Proxy Server. CS425 - Computer Networks Vaibhav Nagar(14785) Concurrent HTTP Proxy Server CS425 - Computer Networks Vaibhav Nagar(14785) Email: vaibhavn@iitk.ac.in August 31, 2016 Elementary features of Proxy Server Proxy server supports the GET method to serve

More information

Advanced Topicson Network Socket Programming

Advanced Topicson Network Socket Programming Advanced Topics on Network Socket Programming Computer Science Department, University of Crete Manolis Surligas surligas@csduocgr October 18, 2017 Manolis Surligas (CSD, UoC) Advanced Topicson Network

More information

CS 3411 Systems Programming

CS 3411 Systems Programming CS 3411 Systems Programming Department of Computer Science Michigan Technological University Sockets Today's Topics New Way of Communicating Between Processes Sockets Standard" Unix Processes/IPC IPC stands

More information

Computer Networks ( Classroom Practice Booklet Solutions)

Computer Networks ( Classroom Practice Booklet Solutions) Computer Networks ( Classroom Practice Booklet Solutions). Concept Of Layering 0. Ans: (b) Sol: Data Link Layer is responsible for decoding bit stream into frames. 0. Ans: (c) Sol: Network Layer has the

More information

Knocking down the HACIENDA with TCP Stealth

Knocking down the HACIENDA with TCP Stealth Knocking down the HACIENDA with TCP Stealth Christian Grothoff Actual work: Julian Kirsch Technische Universität München May 8, 2015 Knocking down the HACIENDA 1/1 Knocking down the HACIENDA 2/1 Knocking

More information

Knocking down the HACIENDA with TCP Stealth

Knocking down the HACIENDA with TCP Stealth Knocking down the HACIENDA with TCP Stealth Christian Grothoff Actual work: Julian Kirsch Technische Universität München July 23, 2015 Knocking down the HACIENDA 1/29 Knocking down the HACIENDA 2/29 Knocking

More information

Overlay Transport Virtualization (OTV) Unicast-Mode Transport Infrastructure Deployment

Overlay Transport Virtualization (OTV) Unicast-Mode Transport Infrastructure Deployment Overlay Transport Virtualization (OTV) Unicast-Mode Transport Infrastructure Deployment July 24, 2012 ALL DESIGNS, SPECIFICATIONS, STATEMENTS, INFORMATION, AND RECOMMENDATIONS (COLLECTIVELY, "DESIGNS")

More information

MCS 260 Exam 2 13 November In order to get full credit, you need to show your work.

MCS 260 Exam 2 13 November In order to get full credit, you need to show your work. MCS 260 Exam 2 13 November 2015 Name: Do not start until instructed to do so. In order to get full credit, you need to show your work. You have 50 minutes to complete the exam. Good Luck! Problem 1 /15

More information

Administrivia. Course Objectives. Overview. Lecture Notes Week markem/cs333/ 2. Staff. 3. Prerequisites. 4. Grading. 1. Theory and application

Administrivia. Course Objectives. Overview. Lecture Notes Week markem/cs333/ 2. Staff. 3. Prerequisites. 4. Grading. 1. Theory and application Administrivia 1. markem/cs333/ 2. Staff 3. Prerequisites 4. Grading Course Objectives 1. Theory and application 2. Benefits 3. Labs TAs Overview 1. What is a computer system? CPU PC ALU System bus Memory

More information

CS 425 / ECE 428 Distributed Systems Fall Indranil Gupta (Indy) Oct. 5, 2017 Lecture 12: Time and Ordering All slides IG

CS 425 / ECE 428 Distributed Systems Fall Indranil Gupta (Indy) Oct. 5, 2017 Lecture 12: Time and Ordering All slides IG CS 425 / ECE 428 Distributed Systems Fall 2017 Indranil Gupta (Indy) Oct. 5, 2017 Lecture 12: Time and Ordering All slides IG Why Synchronization? You want to catch a bus at 6.05 pm, but your watch is

More information

Troubleshooting Replication and Geodata Services. Liz Parrish & Ben Lin

Troubleshooting Replication and Geodata Services. Liz Parrish & Ben Lin Troubleshooting Replication and Geodata Services Liz Parrish & Ben Lin AGENDA: Troubleshooting Replication and Geodata Services Overview Demo Troubleshooting Q & A Overview of Replication Liz Parrish What

More information

Estimation of DNS Source and Cache Dynamics under Interval-Censored Age Sampling

Estimation of DNS Source and Cache Dynamics under Interval-Censored Age Sampling Estimation of DNS Source and Cache Dynamics under Interval-Censored Age Sampling Di Xiao, Xiaoyong Li, Daren B.H. Cline, Dmitri Loguinov Internet Research Lab Department of Computer Science and Engineering

More information

Redesde Computadores(RCOMP)

Redesde Computadores(RCOMP) Redesde Computadores(RCOMP) Theoretical-Practical (TP) Lesson 12 2016/2017 Exam style practical exercise. (IPv4 networks dimensioning; static routeing tables design; CISCO IOS Access Control Lists) Instituto

More information

Boost UDP Transaction Performance

Boost UDP Transaction Performance Boost UDP Transaction Performance Toshiaki Makita NTT Open Source Software Center Today's topics Background Basic technologies for network performance How to improve UDP performance 2 Who is Toshiaki Makita?

More information

Distributed Systems Principles and Paradigms. Chapter 06: Synchronization

Distributed Systems Principles and Paradigms. Chapter 06: Synchronization Distributed Systems Principles and Paradigms Maarten van Steen VU Amsterdam, Dept. Computer Science Room R4.20, steen@cs.vu.nl Chapter 06: Synchronization Version: November 16, 2009 2 / 39 Contents Chapter

More information

Troubleshooting Replication and Geodata Service Issues

Troubleshooting Replication and Geodata Service Issues Troubleshooting Replication and Geodata Service Issues Ken Galliher & Ben Lin Esri UC 2014 Demo Theater Tech Session Overview What is Geodatabase Replication Replication types Geodata service replication

More information

Do we have a quorum?

Do we have a quorum? Do we have a quorum? Quorum Systems Given a set U of servers, U = n: A quorum system is a set Q 2 U such that Q 1, Q 2 Q : Q 1 Q 2 Each Q in Q is a quorum How quorum systems work: A read/write shared register

More information

Slides for Chapter 14: Time and Global States

Slides for Chapter 14: Time and Global States Slides for Chapter 14: Time and Global States From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, Addison-Wesley 2012 Overview of Chapter Introduction Clocks,

More information

A NEW SYSTEM FOR THE GENERATION OF UTC(CH)

A NEW SYSTEM FOR THE GENERATION OF UTC(CH) A NEW SYSTEM FOR THE GENERATION OF UTC(CH) L.G. Bernier and G. Schaller METAS Swiss Federal Office of Metrology Lindenweg 50, Bern-Wabern, CH-3003, Switzerland laurent-guy.bernier@metas.ch Abstract A new

More information

TSCCLOCK: A LOW COST, ROBUST, ACCURATE SOFTWARE CLOCK FOR NETWORKED COMPUTERS

TSCCLOCK: A LOW COST, ROBUST, ACCURATE SOFTWARE CLOCK FOR NETWORKED COMPUTERS TSCCLOCK: A LOW COST, ROBUST, ACCURATE SOFTWARE CLOCK FOR NETWORKED COMPUTERS Darryl Veitch d.veitch@ee.unimelb.edu.au http://www.cubinlab.ee.unimelb.edu.au/ darryl Collaboration with Julien Ridoux CUBIN,

More information

Leopold Franzens University Innsbruck. Responding to Spurious Loss Events in TCP/IP. Master Thesis. Institute of Computer Science

Leopold Franzens University Innsbruck. Responding to Spurious Loss Events in TCP/IP. Master Thesis. Institute of Computer Science Leopold Franzens University Innsbruck Institute of Computer Science Distributed and Parallel Systems Group Responding to Spurious Loss Events in TCP/IP Master Thesis Supervisor: Dr. Michael Welzl Author:

More information

E8 TCP. Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione

E8 TCP. Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione E8 TP Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione Exercises o onsider the connection in the figure A =80 kbit/s τ =0 ms R =? τ =? B o o o Host A wants to know the capacity

More information

Distributed Systems. Time, Clocks, and Ordering of Events

Distributed Systems. Time, Clocks, and Ordering of Events Distributed Systems Time, Clocks, and Ordering of Events Björn Franke University of Edinburgh 2016/2017 Today Last lecture: Basic Algorithms Today: Time, clocks, NTP Ref: CDK Causality, ordering, logical

More information

Time in Distributed Systems: Clocks and Ordering of Events

Time in Distributed Systems: Clocks and Ordering of Events Time in Distributed Systems: Clocks and Ordering of Events Clocks in Distributed Systems Needed to Order two or more events happening at same or different nodes (Ex: Consistent ordering of updates at different

More information

Networked Control Systems

Networked Control Systems Networked Control Systems Simulation & Analysis J.J.C. van Schendel DCT 2008.119 Traineeship report March till June 2008 Coaches: Supervisor TU/e: Prof. Dr. D. Nesic, University of Melbourne Dr. M. Tabbara,

More information

Distributed Systems Principles and Paradigms

Distributed Systems Principles and Paradigms Distributed Systems Principles and Paradigms Chapter 6 (version April 7, 28) Maarten van Steen Vrije Universiteit Amsterdam, Faculty of Science Dept. Mathematics and Computer Science Room R4.2. Tel: (2)

More information

INF Models of concurrency

INF Models of concurrency INF4140 - Models of concurrency RPC and Rendezvous INF4140 Lecture 15. Nov. 2017 RPC and Rendezvous Outline More on asynchronous message passing interacting processes with different patterns of communication

More information

DISTRIBUTED COMPUTER SYSTEMS

DISTRIBUTED COMPUTER SYSTEMS DISTRIBUTED COMPUTER SYSTEMS SYNCHRONIZATION Dr. Jack Lange Computer Science Department University of Pittsburgh Fall 2015 Topics Clock Synchronization Physical Clocks Clock Synchronization Algorithms

More information

Outline F eria AADL behavior 1/ 78

Outline F eria AADL behavior 1/ 78 Outline AADL behavior Annex Jean-Paul Bodeveix 2 Pierre Dissaux 3 Mamoun Filali 2 Pierre Gaufillet 1 François Vernadat 2 1 AIRBUS-FRANCE 2 FéRIA 3 ELLIDIS SAE AS2C Detroit Michigan April 2006 FéRIA AADL

More information

The Analysis of Microburst (Burstiness) on Virtual Switch

The Analysis of Microburst (Burstiness) on Virtual Switch The Analysis of Microburst (Burstiness) on Virtual Switch Chunghan Lee Fujitsu Laboratories 09.19.2016 Copyright 2016 FUJITSU LABORATORIES LIMITED Background What is Network Function Virtualization (NFV)?

More information

MODBUS Protocol for CS141 network card families

MODBUS Protocol for CS141 network card families Last update: 20/09/208 MODBUS Protocol for CS4 network card families Summary. MODBUS PROTOCOL... 2.. MODBUS COMMUNICATION PARAMETERS... 2.2. AVAILABLE MODBUS FUNCTION CODES... 2.3. EXCEPTION CODES... 3

More information

An Optimal Index Policy for the Multi-Armed Bandit Problem with Re-Initializing Bandits

An Optimal Index Policy for the Multi-Armed Bandit Problem with Re-Initializing Bandits An Optimal Index Policy for the Multi-Armed Bandit Problem with Re-Initializing Bandits Peter Jacko YEQT III November 20, 2009 Basque Center for Applied Mathematics (BCAM), Bilbao, Spain Example: Congestion

More information

Deterministic Networking for Real-Time Systems

Deterministic Networking for Real-Time Systems Deterministic Networking for Real-Time Systems (Using TSN and DetNet) Henrik Austad haustad@cisco.com Cisco Systems Prague, Oct 25, 2017 about:henrik I I I I I I Cisco Collaboration, Audio group at Lysaker,

More information

A study of entropy transfers

A study of entropy transfers A study of entropy transfers in the Linux Random Number Generator Th. Vuillemin, F. Goichon, G. Salagnac, C. Lauradoux The need for random numbers Computers are built to be fully deterministic......but

More information

Agreement. Today. l Coordination and agreement in group communication. l Consensus

Agreement. Today. l Coordination and agreement in group communication. l Consensus Agreement Today l Coordination and agreement in group communication l Consensus Events and process states " A distributed system a collection P of N singlethreaded processes w/o shared memory Each process

More information

Reaxys Pipeline Pilot Components Installation and User Guide

Reaxys Pipeline Pilot Components Installation and User Guide 1 1 Reaxys Pipeline Pilot components for Pipeline Pilot 9.5 Reaxys Pipeline Pilot Components Installation and User Guide Version 1.0 2 Introduction The Reaxys and Reaxys Medicinal Chemistry Application

More information

An introduction to flash memory in Linux

An introduction to flash memory in Linux An introduction to flash memory in Linux Ezequiel Garcia Linux Developer Conference Brazil 2018 1/34 Agenda Flash memory: NAND and NOR Linux MTD subsystem Linux UBI/UBIFS systems

More information

Model-based Prototyping of an Interoperability Protocol for Mobile Ad-hoc Networks

Model-based Prototyping of an Interoperability Protocol for Mobile Ad-hoc Networks Model-based Prototyping of an Interoperability Protocol for Mobile Ad-hoc Networks L. M. Kristensen, M. Westergaard, and P. C. Nørgaard 2 Department of Computer Science, University of Aarhus, IT-parken,

More information

Distributed systems Lecture 4: Clock synchronisation; logical clocks. Dr Robert N. M. Watson

Distributed systems Lecture 4: Clock synchronisation; logical clocks. Dr Robert N. M. Watson Distributed systems Lecture 4: Clock synchronisation; logical clocks Dr Robert N. M. Watson 1 Last time Started to look at time in distributed systems Coordinating actions between processes Physical clocks

More information

Antonio Falabella. 3 rd nternational Summer School on INtelligent Signal Processing for FrontIEr Research and Industry, September 2015, Hamburg

Antonio Falabella. 3 rd nternational Summer School on INtelligent Signal Processing for FrontIEr Research and Industry, September 2015, Hamburg INFN - CNAF (Bologna) 3 rd nternational Summer School on INtelligent Signal Processing for FrontIEr Research and Industry, 14-25 September 2015, Hamburg 1 / 44 Overview 1 2 3 4 5 2 / 44 to Computing The

More information

Operating Systems. VII. Synchronization

Operating Systems. VII. Synchronization Operating Systems VII. Synchronization Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Outline Synchronization issues 2/22 Fall 2017 Institut

More information

Congestion Control. Need to understand: What is congestion? How do we prevent or manage it?

Congestion Control. Need to understand: What is congestion? How do we prevent or manage it? Congestion Control Phenomenon: when too much traffic enters into system, performance degrades excessive traffic can cause congestion Problem: regulate traffic influx such that congestion does not occur

More information

SDS developer guide. Develop distributed and parallel applications in Java. Nathanaël Cottin. version

SDS developer guide. Develop distributed and parallel applications in Java. Nathanaël Cottin. version SDS developer guide Develop distributed and parallel applications in Java Nathanaël Cottin sds@ncottin.net http://sds.ncottin.net version 0.0.3 Copyright 2007 - Nathanaël Cottin Permission is granted to

More information

IEEE C /058r3

IEEE C /058r3 Project Title IEEE 802.16 Broadband Wireless Access Working Group MAC support and the general structure of the Coexistence Protocol messages Date Submitted 2006-07-13 Source(s)

More information

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University Prof. Sunil P Khatri (Lab exercise created and tested by Ramu Endluri, He Zhou and Sunil P

More information

A Methodology for Clock Benchmarking

A Methodology for Clock Benchmarking A Methodology for Clock Benchmarking Julien Ridoux j.ridoux@ee.unimelb.edu.au Darryl Veitch d.veitch@ee.unimelb.edu.au ARC Special Research Centre for Ultra-Broadband Information Networks THE UNIVERSITY

More information

Unreliable Failure Detectors for Reliable Distributed Systems

Unreliable Failure Detectors for Reliable Distributed Systems Unreliable Failure Detectors for Reliable Distributed Systems A different approach Augment the asynchronous model with an unreliable failure detector for crash failures Define failure detectors in terms

More information

CS505: Distributed Systems

CS505: Distributed Systems Cristina Nita-Rotaru CS505: Distributed Systems Ordering events. Lamport and vector clocks. Global states. Detecting failures. Required reading for this topic } Leslie Lamport,"Time, Clocks, and the Ordering

More information

NovaToast SmartVision Project Requirements

NovaToast SmartVision Project Requirements NovaToast SmartVision Project Requirements Jacob Anderson William Chen Christopher Kim Jonathan Simozar Brian Wan Revision History v1.0: Initial creation of the document and first draft. v1.1 (2/9): Added

More information

4th year Project demo presentation

4th year Project demo presentation 4th year Project demo presentation Colm Ó héigeartaigh CASE4-99387212 coheig-case4@computing.dcu.ie 4th year Project demo presentation p. 1/23 Table of Contents An Introduction to Quantum Computing The

More information

FLAME Flexible Lightweight Active Measurement Environment

FLAME Flexible Lightweight Active Measurement Environment FLAME Flexible Lightweight Active Measurement Environment Marcos L. Kirszenblatt Thiago B. Cardozo Artur Ziviani Antônio Tadeu A. Gomes National Laboratory for Scientific Computing (LNCC) {marcoslk,thiagoc,ziviani,atagomes}@lncc.br

More information

Time. Lakshmi Ganesh. (slides borrowed from Maya Haridasan, Michael George)

Time. Lakshmi Ganesh. (slides borrowed from Maya Haridasan, Michael George) Time Lakshmi Ganesh (slides borrowed from Maya Haridasan, Michael George) The Problem Given a collection of processes that can... only communicate with significant latency only measure time intervals approximately

More information

CS276 Homework 1: ns-2

CS276 Homework 1: ns-2 CS276 Homework 1: ns-2 Erik Peterson October 28, 2006 1 Part 1 - Fairness between TCP variants 1.1 Method After learning ns-2, I wrote a script (Listing 3) that runs a simulation of one or two tcp flows

More information

Distributed Systems. Time, clocks, and Ordering of events. Rik Sarkar. University of Edinburgh Spring 2018

Distributed Systems. Time, clocks, and Ordering of events. Rik Sarkar. University of Edinburgh Spring 2018 Distributed Systems Time, clocks, and Ordering of events Rik Sarkar University of Edinburgh Spring 2018 Notes Today: Time, clocks, NTP Ref: CDK Causality, ordering, logical clocks: Ref: VG, CDK Time Ordering

More information

10:00 12:30. Do not open this problem booklet until the start of the examination is announced.

10:00 12:30. Do not open this problem booklet until the start of the examination is announced. 21 I 20 8 26 10:00 12:30 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 4.. Answer the following 4 problems. Use the designated answer sheet for each problem.

More information

Performance Analysis of Priority Queueing Schemes in Internet Routers

Performance Analysis of Priority Queueing Schemes in Internet Routers Conference on Information Sciences and Systems, The Johns Hopkins University, March 8, Performance Analysis of Priority Queueing Schemes in Internet Routers Ashvin Lakshmikantha Coordinated Science Lab

More information

Deadlock. CSE 2431: Introduction to Operating Systems Reading: Chap. 7, [OSC]

Deadlock. CSE 2431: Introduction to Operating Systems Reading: Chap. 7, [OSC] Deadlock CSE 2431: Introduction to Operating Systems Reading: Chap. 7, [OSC] 1 Outline Resources Deadlock Deadlock Prevention Deadlock Avoidance Deadlock Detection Deadlock Recovery 2 Review: Synchronization

More information

Infrared Tire Temperature Sensor, IRTS-V2 - Datasheet

Infrared Tire Temperature Sensor, IRTS-V2 - Datasheet The Izze-Racing tire temperature sensor is specifically designed to measure the highly transient surface temperature of a tire with spatial fidelity, providing invaluable information for chassis tuning,

More information

2IN35 VLSI Programming Lab Work Communication Protocols: A Synchronous and an Asynchronous One

2IN35 VLSI Programming Lab Work Communication Protocols: A Synchronous and an Asynchronous One 2IN35 VLSI Programming Lab Work Communication Protocols: A Synchronous and an Asynchronous One René Gabriëls, r.gabriels@student.tue.nl July 1, 2008 1 Contents 1 Introduction 3 2 Problem Description 3

More information

Chapter 11 Time and Global States

Chapter 11 Time and Global States CSD511 Distributed Systems 分散式系統 Chapter 11 Time and Global States 吳俊興 國立高雄大學資訊工程學系 Chapter 11 Time and Global States 11.1 Introduction 11.2 Clocks, events and process states 11.3 Synchronizing physical

More information

Approximate Fairness with Quantized Congestion Notification for Multi-tenanted Data Centers

Approximate Fairness with Quantized Congestion Notification for Multi-tenanted Data Centers Approximate Fairness with Quantized Congestion Notification for Multi-tenanted Data Centers Abdul Kabbani Stanford University Joint work with: Mohammad Alizadeh, Masato Yasuda, Rong Pan, and Balaji Prabhakar

More information

Lan Performance LAB Ethernet : CSMA/CD TOKEN RING: TOKEN

Lan Performance LAB Ethernet : CSMA/CD TOKEN RING: TOKEN Lan Performance LAB Ethernet : CSMA/CD TOKEN RING: TOKEN Ethernet Frame Format 7 b y te s 1 b y te 2 o r 6 b y te s 2 o r 6 b y te s 2 b y te s 4-1 5 0 0 b y te s 4 b y te s P r e a m b le S ta r t F r

More information

Part I. System call overview. Secure Operating System Design and Implementation System Calls. Overview. Abstraction. Jon A. Solworth.

Part I. System call overview. Secure Operating System Design and Implementation System Calls. Overview. Abstraction. Jon A. Solworth. Secure Operating System Design and Implementation System Calls Jon A. Solworth Part I System call overview Dept. of Computer Science University of Illinois at Chicago February 1, 2011 Overview Abstraction

More information

Capacity management for packet-switched networks with heterogeneous sources. Linda de Jonge. Master Thesis July 29, 2009.

Capacity management for packet-switched networks with heterogeneous sources. Linda de Jonge. Master Thesis July 29, 2009. Capacity management for packet-switched networks with heterogeneous sources Linda de Jonge Master Thesis July 29, 2009 Supervisors Dr. Frank Roijers Prof. dr. ir. Sem Borst Dr. Andreas Löpker Industrial

More information

Go Tutorial. Ian Lance Taylor. Introduction. Why? Language. Go Tutorial. Ian Lance Taylor. GCC Summit, October 27, 2010

Go Tutorial. Ian Lance Taylor. Introduction. Why? Language. Go Tutorial. Ian Lance Taylor. GCC Summit, October 27, 2010 GCC Summit, October 27, 2010 Go Go is a new experimental general purpose programming language. Main developers are: Russ Cox Robert Griesemer Rob Pike Ken Thompson It was released as free software in November

More information

CS418 Operating Systems

CS418 Operating Systems CS418 Operating Systems Lecture 14 Queuing Analysis Textbook: Operating Systems by William Stallings 1 1. Why Queuing Analysis? If the system environment changes (like the number of users is doubled),

More information

Figure 10.1 Skew between computer clocks in a distributed system

Figure 10.1 Skew between computer clocks in a distributed system Figure 10.1 Skew between computer clocks in a distributed system Network Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001

More information

Congestion Control. Phenomenon: when too much traffic enters into system, performance degrades excessive traffic can cause congestion

Congestion Control. Phenomenon: when too much traffic enters into system, performance degrades excessive traffic can cause congestion Congestion Control Phenomenon: when too much traffic enters into system, performance degrades excessive traffic can cause congestion Problem: regulate traffic influx such that congestion does not occur

More information

Min Congestion Control for High- Speed Heterogeneous Networks. JetMax: Scalable Max-Min

Min Congestion Control for High- Speed Heterogeneous Networks. JetMax: Scalable Max-Min JetMax: Scalable Max-Min Min Congestion Control for High- Speed Heterogeneous Networks Yueping Zhang Joint work with Derek Leonard and Dmitri Loguinov Internet Research Lab Department of Computer Science

More information

CS 3411 Systems Programming

CS 3411 Systems Programming CS 3411 Systems Programming Department of Computer Science Michigan Technological University Pipe Inter-Process Communication in Unix Today's Topics How to communicate between processes without using signals

More information

Coordination. Failures and Consensus. Consensus. Consensus. Overview. Properties for Correct Consensus. Variant I: Consensus (C) P 1. v 1.

Coordination. Failures and Consensus. Consensus. Consensus. Overview. Properties for Correct Consensus. Variant I: Consensus (C) P 1. v 1. Coordination Failures and Consensus If the solution to availability and scalability is to decentralize and replicate functions and data, how do we coordinate the nodes? data consistency update propagation

More information

Modern Functional Programming and Actors With Scala and Akka

Modern Functional Programming and Actors With Scala and Akka Modern Functional Programming and Actors With Scala and Akka Aaron Kosmatin Computer Science Department San Jose State University San Jose, CA 95192 707-508-9143 akosmatin@gmail.com Abstract For many years,

More information

Innovation. The Push and Pull at ESRI. September Kevin Daugherty Cadastral/Land Records Industry Solutions Manager

Innovation. The Push and Pull at ESRI. September Kevin Daugherty Cadastral/Land Records Industry Solutions Manager Innovation The Push and Pull at ESRI September 2004 Kevin Daugherty Cadastral/Land Records Industry Solutions Manager The Push and The Pull The Push is the information technology that drives research and

More information

PC Based Precision Timing Without GPS

PC Based Precision Timing Without GPS PC Based Precision Timing Without GPS Attila Pásztor EMULab at the Department of Electrical & Electronic Engineering The University of Melbourne, Victoria 31, Australia and Ericsson Hungary R&D a.pasztor@ee.mu.oz.au

More information

FlowSpec. Frédéric Gabut-Deloraine. FRnOG - 2 décembre 2011 NEO TELECOMS

FlowSpec. Frédéric Gabut-Deloraine. FRnOG - 2 décembre 2011 NEO TELECOMS FlowSpec Frédéric Gabut-Deloraine NEO TELECOMS FRnOG - 2 décembre 2011 Introduction Dissemination of Flow Specification Rules D(D)oS filtering Regular use Easy to disseminate Agenda Background Forwarding

More information

Data byte 0 Data byte 1 Data byte 2 Data byte 3 Data byte 4. 0xA Register Address MSB data byte Data byte Data byte LSB data byte

Data byte 0 Data byte 1 Data byte 2 Data byte 3 Data byte 4. 0xA Register Address MSB data byte Data byte Data byte LSB data byte SFP200 CAN 2.0B Protocol Implementation Communications Features CAN 2.0b extended frame format 500 kbit/s Polling mechanism allows host to determine the rate of incoming data Registers The SFP200 provides

More information

STRIBOB : Authenticated Encryption

STRIBOB : Authenticated Encryption 1 / 19 STRIBOB : Authenticated Encryption from GOST R 34.11-2012 or Whirlpool Markku-Juhani O. Saarinen mjos@item.ntnu.no Norwegian University of Science and Technology Directions in Authentication Ciphers

More information

CALIFORNIA INSTITUTE OF TECHNOLOGY Control and Dynamical Systems

CALIFORNIA INSTITUTE OF TECHNOLOGY Control and Dynamical Systems CDS 101 1. Åström and Murray, Exercise 1.3 2. Åström and Murray, Exercise 1.4 3. Åström and Murray, Exercise 2.6, parts (a) and (b) CDS 110a 1. Åström and Murray, Exercise 1.4 2. Åström and Murray, Exercise

More information

BTstack Getting Started. Using MSP430 Examples. Dr. sc. Milanka Ringwald Dr. sc. Matthias Ringwald

BTstack Getting Started. Using MSP430 Examples. Dr. sc. Milanka Ringwald Dr. sc. Matthias Ringwald VERSION 1.1 August 30, 2013 BTstack Getting Started Using MSP430 Examples Dr. sc. Milanka Ringwald Dr. sc. Matthias Ringwald contact@bluekitchen-gmbh.com Contents 1. Get started with BTstack and MSP-EXP430F5438

More information

CS 347 Parallel and Distributed Data Processing

CS 347 Parallel and Distributed Data Processing CS 347 Parallel and Distributed Data Processing Spring 2016 & Clocks, Clocks, and the Ordering of Events in a Distributed System. L. Lamport, Communications of the ACM, 1978 Notes 15: & Clocks CS 347 Notes

More information

Análise e Modelagem de Desempenho de Sistemas de Computação

Análise e Modelagem de Desempenho de Sistemas de Computação Análise e Modelagem de Desempenho de Sistemas de Computação ``Performance Models Virgilio A. F. Almeida 1 o Semestre de 2009 Introdução: Semana #4 Computer Science Department Federal University of Minas

More information

Process Scheduling. Process Scheduling. CPU and I/O Bursts. CPU - I/O Burst Cycle. Variations in Bursts. Histogram of CPU Burst Times

Process Scheduling. Process Scheduling. CPU and I/O Bursts. CPU - I/O Burst Cycle. Variations in Bursts. Histogram of CPU Burst Times Scheduling The objective of multiprogramming is to have some process running all the time The objective of timesharing is to have the switch between processes so frequently that users can interact with

More information

High Performance Computing

High Performance Computing Master Degree Program in Computer Science and Networking, 2014-15 High Performance Computing 2 nd appello February 11, 2015 Write your name, surname, student identification number (numero di matricola),

More information

THE SPATIAL DATA SERVER BASED ON OPEN GIS STANDARDS IN HETEROGENEOUS DISTRIBUTED ENVIRONMENT

THE SPATIAL DATA SERVER BASED ON OPEN GIS STANDARDS IN HETEROGENEOUS DISTRIBUTED ENVIRONMENT Geoinformatics 2004 Proc. 12th Int. Conf. on Geoinformatics Geospatial Information Research: Bridging the Pacific and Atlantic University of Gävle, Sweden, 7-9 June 2004 THE SPATIAL DATA SERVER BASED ON

More information

Shared on QualifyGate.com

Shared on QualifyGate.com CS-GATE-05 GATE 05 A Brief Analysis (Based on student test experiences in the stream of CS on 8th February, 05 (Morning Session) Section wise analysis of the paper Section Classification Mark Marks Total

More information

These are special traffic patterns that create more stress on a switch

These are special traffic patterns that create more stress on a switch Myths about Microbursts What are Microbursts? Microbursts are traffic patterns where traffic arrives in small bursts. While almost all network traffic is bursty to some extent, storage traffic usually

More information

COMP9334: Capacity Planning of Computer Systems and Networks

COMP9334: Capacity Planning of Computer Systems and Networks COMP9334: Capacity Planning of Computer Systems and Networks Week 2: Operational analysis Lecturer: Prof. Sanjay Jha NETWORKS RESEARCH GROUP, CSE, UNSW Operational analysis Operational: Collect performance

More information

Clocks in Asynchronous Systems

Clocks in Asynchronous Systems Clocks in Asynchronous Systems The Internet Network Time Protocol (NTP) 8 Goals provide the ability to externally synchronize clients across internet to UTC provide reliable service tolerating lengthy

More information

Our Problem. Model. Clock Synchronization. Global Predicate Detection and Event Ordering

Our Problem. Model. Clock Synchronization. Global Predicate Detection and Event Ordering Our Problem Global Predicate Detection and Event Ordering To compute predicates over the state of a distributed application Model Clock Synchronization Message passing No failures Two possible timing assumptions:

More information

Solutions to COMP9334 Week 8 Sample Problems

Solutions to COMP9334 Week 8 Sample Problems Solutions to COMP9334 Week 8 Sample Problems Problem 1: Customers arrive at a grocery store s checkout counter according to a Poisson process with rate 1 per minute. Each customer carries a number of items

More information

Recursive InterNetworking Architecture (RINA) Boston University Prototype Programming Manual (version 1.0)

Recursive InterNetworking Architecture (RINA) Boston University Prototype Programming Manual (version 1.0) Recursive InterNetworking Architecture (RINA) Boston University Prototype Programming Manual (version 1.0) Yuefeng Wang Flavio Esposito Ibrahim Matta John Day {wyf, flavio, matta, day}@bu.edu Recursive

More information

Implementation of the IEEE 1588 Precision Time Protocol for Clock Synchronization in the Radio Detection of Ultra-High Energy Neutrinos

Implementation of the IEEE 1588 Precision Time Protocol for Clock Synchronization in the Radio Detection of Ultra-High Energy Neutrinos i Implementation of the IEEE 1588 Precision Time Protocol for Clock Synchronization in the Radio Detection of Ultra-High Energy Neutrinos Undergraduate Research Thesis Presented in partial fulfillment

More information

Inter-Reactive Kotlin Applications

Inter-Reactive Kotlin Applications Inter-Reactive Kotlin Applications Julien Viet @julienviet Julien Viet Open source developer for 15+ years Current @vertx_project lead Principal software engineer at Marseille Java User Group Leader https://www.julienviet.com/

More information

Network Traffic Characteristic

Network Traffic Characteristic Network Traffic Characteristic Hojun Lee hlee02@purros.poly.edu 5/24/2002 EL938-Project 1 Outline Motivation What is self-similarity? Behavior of Ethernet traffic Behavior of WAN traffic Behavior of WWW

More information

Trivadis Integration Blueprint V0.1

Trivadis Integration Blueprint V0.1 Spring Integration Peter Welkenbach Principal Consultant peter.welkenbach@trivadis.com Agenda Integration Blueprint Enterprise Integration Patterns Spring Integration Goals Main Components Architectures

More information

Distributed Systems Fundamentals

Distributed Systems Fundamentals February 17, 2000 ECS 251 Winter 2000 Page 1 Distributed Systems Fundamentals 1. Distributed system? a. What is it? b. Why use it? 2. System Architectures a. minicomputer mode b. workstation model c. processor

More information

Wireless Internet Exercises

Wireless Internet Exercises Wireless Internet Exercises Prof. Alessandro Redondi 2018-05-28 1 WLAN 1.1 Exercise 1 A Wi-Fi network has the following features: Physical layer transmission rate: 54 Mbps MAC layer header: 28 bytes MAC

More information

Patrol: Revealing Zero-day Attack Paths through Network-wide System Object Dependencies

Patrol: Revealing Zero-day Attack Paths through Network-wide System Object Dependencies Patrol: Revealing Zero-day Attack Paths through Network-wide System Object Dependencies Jun Dai, Xiaoyan Sun, and Peng Liu College of Information Sciences and Technology Pennsylvania State University,

More information

Network Configuration Example

Network Configuration Example Network Configuration Example Validated Reference - Business Edge Solution - Device PE-6 Release 1.0 Published: 2014-03-31 Juniper Networks, Inc. 1194 North Mathilda Avenue Sunnyvale, California 94089

More information

Mininet on OpenBSD. Using rdomains for Interactive SDN Testing and Development. Ayaka Koshibe. BSDCan

Mininet on OpenBSD. Using rdomains for Interactive SDN Testing and Development. Ayaka Koshibe. BSDCan Mininet on OpenBSD Using rdomains for Interactive SDN Testing and Development Ayaka Koshibe akoshibe@openbsd.org BSDCan 2018 SDN? Anything you want it to mean... Or rather, a way to logically centralize

More information