Delays and IPC CS144 Review Session 2 April 11, 2008 Ben Nham.

Slides:



Advertisements
Similar presentations
EE:450 – Computer Networks
Advertisements

Probability Review.
ECE358: Computer Networks Fall 2014
TCP-IP Primer David Cozens. Targets Have a basic understanding of Ethernet network technology Be aware of how this technology is applied on the 5000 series.
Fundamentals of Computer Networks ECE 478/578
Networks: Sample Performance Problems 1 Sample Network Performance Problems.
James 1:5 If any of you lacks wisdom, he should ask God, who gives generously to all without finding fault, and it will be given to him.
Computer Networks Computer Networks Term B10 Network Delay Network Delay Performance Problems.
Sockets Programming CS144 Review Session 1 April 4, 2008 Ben Nham.
1 K. Salah Module 2.1: QA – Putting it all together What is the max number of users/connections/sessions a particular network can support for handling.
1 Processes and Pipes COS 217 Professor Jennifer Rexford.
Lecture 2 Introduction 1-1 Chapter 1: roadmap 1.1 What is the Internet? 1.2 Network edge  end systems, access networks, links 1.3 Network core  circuit.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Performance Modeling Computer Science Division Department of Electrical Engineering and Computer.
Network Delays, Statistical Multiplexing
Inter Process Communication:  It is an essential aspect of process management. By allowing processes to communicate with each other: 1.We can synchronize.
Computer Networks: Performance Measures1 Computer Network Performance Measures.
Lecture Internet Overview: roadmap 1.1 What is the Internet? (A simple overview last week) Today, A closer look at the Internet structure! 1.2 Network.
Networks:Sample Performance Problems 1 Sample Network Performance Problems.
Lecture Internet Overview: roadmap 1.1 What is the Internet? 1.2 Network edge  end systems, access networks, links 1.3 Network core  circuit switching,
Networks: Sample Performance Problems 1 Sample Network Performance Problems.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao
Lecture Internet Overview: roadmap 1.1 What is the Internet? 1.2 Network edge  end systems, access networks, links 1.3 Network core  circuit switching,
Problems.
Chapter 3 Data and Signals
Advanced Computer Networks 1 Sample Network Performance Problems.
Chapter 3 part II Data and Signals
Enhanced CSMA Additional improvement  Use CSMA access  Listen while transmitting  Stop immediately if collision sensed  Called collision detection.
3.1 Figure 3.16 Two digital signals: one with two signal levels and the other with four signal levels.
Chapter 4 Computer Networks – Part 1
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 8.
Instructor: Christopher Cole Some slides taken from Kurose & Ross book IT 347: Chapter 1.
Brierley 1 Module 4 Module 4 Introduction to LAN Switching.
How do loss and delay occur?
Computer Networks Performance Metrics. Performance Metrics Outline Generic Performance Metrics Network performance Measures Components of Hop and End-to-End.
Shell (Part 2). Example r What if we want to support something like this: m ps –le | sort r One process should execute ps –le and another should execute.
Data and Computer Communications Ninth Edition by William Stallings Data and Computer Communications, Ninth Edition by William Stallings, (c) Pearson Education.
System Commands and Interprocess Communication. chroot int chroot(const char *path); chroot changes the root directory to that specified in path. This.
CS 164: Slide Set 2: Chapter 1 -- Introduction (continued).
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 7.
CS162B: Pipes Jacob T. Chan. Pipes  These allow output of one process to be the input of another process  One of the oldest and most basic forms of.
Privilege separation in Condor Bruce Beckles University of Cambridge Computing Service.
Four sources of packet delay
Agenda  Redirection: Purpose Redirection Facts How to redirecting stdin, stdout, stderr in a program  Pipes: Using Pipes Named Pipes.
Chapter 71 Deadlock Detection revisited. Chapter 72 Message Passing (see Section 4.5 in Processes Chapter)  A general method used for interprocess communication.
What is a Network? Living Online Lesson 1 Mrs. Elzey.
1 Computer Networks & The Internet Lecture 4 Imran Ahmed University of Management & Technology.
2001 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 4.
S -1 Pipes. S -2 Inter-Process Communication (IPC) Chapter Data exchange techniques between processes: –message passing: files, pipes, sockets.
CE Operating Systems Lecture 13 Linux/Unix interprocess communication.
IPC Programming. Process Model Processes can be organized into a parent-child hierarchy. Consider the following example code: /* */
Operating Systems Yasir Kiani. 13-Sep Agenda for Today Review of previous lecture Interprocess communication (IPC) and process synchronization UNIX/Linux.
CS 3830 Day 4 Introduction 1-1. Announcements  No office hour 12pm-1pm today only  Quiz on Friday  Program 1 due on Friday (put in DropBox on S drive)
What is the Speed of the Internet? Internet Computing KUT Youn-Hee Han.
9-Jan-164/598N: Computer Networks Overview Performance metrics - Section 1.5 Direct link networks –Hardware building blocks - Section 2.1 –Encoding - Section.
Intro to Socket Programming CS 360. Page 2 CS 360, WSU Vancouver Two views: Server vs. Client Servers LISTEN for a connection and respond when one is.
Delay in packet switched network. Circuit switching In Circuit switched networks the resources needed along a path (buffers and link transmission rate)
CSCI 330 UNIX and Network Programming
Dsh: A Devil Shell COMPSCI210 Recitation 14 Sep 2012 Vamsi Thummala.
1 Ram Dantu University of North Texas, Practical Networking.
A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their original slides that accompany the.
CSEN 404 Introduction to Networks Amr El Mougy Lamia AlBadrawy.
Introduction to Networks
CS 5565 Network Architecture and Protocols
File redirection ls > out
Programming Assignment # 2 – Supplementary Discussion
Virtual Memory CSCI 380: Operating Systems Lecture #7 -- Review and Lab Suggestions William Killian.
CSCI 380: Operating Systems William Killian
Propagation & Transmission delay
System Programming: Process Management
Presentation transcript:

Delays and IPC CS144 Review Session 2 April 11, 2008 Ben Nham

Announcements Except for things that pertain only to you, use the newsgroup, not the staff list

Delays We want to send a message between two hosts, hooked up directly via a link – Message is of length L bits – Link’s transmission rate is R bits per second – Hosts are distance d meters apart What are the relevant delays? – Propagation delay – Transmission delay A B R bpsd m L bits

Propagation Delay The time it takes to send one bit from A to B Bounded by: – Length d of link – Propagation speed s of link Bounded by speed of light Usually about 2*10 8 m/s Prop delay = d/s A B R bpsd m L bits

Transmission Delay Time it takes for all bits of the message to be pushed onto the link Bounded by: – Length L of message – Transmission rate R of link E.g. fully utilized Fast Ethernet = 100 Mbps ADSL = 1.5 Mbps (varies) Transmission delay = L/R A B R bpsd m L bits

Total Delay For one link: – Total Delay = Prop delay + Trans delay = d/s + L/R – Suppose: d = 1 km, s = 2*10 8 m/s → t prop = 5 μs L = 500 bytes, R = 100 Mbps → t trans = 40 μs Total = t prop + t trans = 45 μs What happens when we compose links, placing routers in between? – Have to add a queuing delay component A B R bpsd m L bits

Worst-Case Bisection Bandwidth Take a network topology, and partition the nodes in two equal parts Bisection bandwidth = bandwidth of links that travel across partition The worst possible bandwidth between all sets of equal partitions is the worst-case bisection bandwidth Note: people commonly use “bisection BW” to mean “worst-case bisection BW” 10 Mbps 100 Mbps 1 Gbps

Worst-Case Bisection Bandwidth Take a network topology, and partition the nodes in two equal parts Bisection bandwidth = bandwidth of links that travel across partition The worst possible bandwidth between all sets of equal partitions is the worst-case bisection bandwidth Note: people commonly use “bisection BW” to mean “worst-case bisection BW” Bisection BW = 40 Mbps 10 Mbps 100 Mbps 1 Gbps

Client-Server File Transfer Suppose Blizzard wants to distribute a patch for WoW – Patch size is 450 MB = 3600 Mbits – Need to distribute patch to 5 million players over 5 hours – How many 100 MBps servers are needed? 3600 Mbits * 5 million / 5 hours = 1*10 12 bps 1*10 12 bps / 100 Mbps = servers

Peer to Peer File Transfer Use one 100 Mbps server, and suppose each client has a 1Mbps full-duplex link Split the patch into 450 chunks, 1MB each Then: – Seed each chunk to one client each – Wait for every client to get at least one chunk – Wait for every client to acquire the other 449 chunks

Seeding Seed each chunk to one client each 450 * 1 MB / 100 Mbps = 1 min to seed Server 100 Mbps

Exponential Growth Wait for every client to get at least one chunk We have 450 seed clients with 1 Mbps links – 5 million clients / 450 seeds = clients/seed – This distribution takes place exponentially: ceil(log ) = 14 time steps Each time step is 1 MB / 1 Mbps = 8 s Total time: 14 * 8 s = 2 minutes AA B

Exponential Growth Wait for every client to get at least one chunk We have 450 seed clients with 1 Mbps links – 5 million clients / 450 seeds = clients/seed – This distribution takes place exponentially: ceil(log ) = 14 time steps Each time step is 1 MB / 1 Mbps = 8 s Total time: 14 * 8 s = 2 minutes AA B C D A B

Exponential Growth Wait for every client to get at least one chunk We have 450 seed clients with 1 Mbps links – 5 million clients / 450 seeds = clients/seed – This distribution takes place exponentially: ceil(log ) = 14 time steps Each time step is 1 MB / 1 Mbps = 8 s Total time: 14 * 8 s = 2 minutes AA B C D A B G H E F C D A B

Peak Transfer Now each client has a single chunk Everyone can utilize their full 1Mbps connection For any client, takes 449 * 8s = 1 hour to download the rest of the chunks in the patch Adding up: – Seeding takes 1 minute – Exponential growth until everyone has a chunk takes 2 min – Finishing transfer takes 1 hour – 1 min + 2 min + 1 hour << 5 hours – 1 server << servers

Lab 2: Fingerd Finger service isn’t enabled locally on cluster, so use “finger instead You will need to understand: – Writing servers (last week) – New IPC syscalls: fork() exec*(…) pipe() dup2(src, target)

Forking Makes a copy of the current process (inherits everything: memory space, file descriptors, signal handlers, …) The child will return with 0 The parent will return with the pid of the child Parent must either: – Explicitly wait on the child – Install a signal handler that catches the SIGCHLD from child and waits in the signal handler – Otherwise, zombie process created! Can use exec* to replace ourselves with another executable Figure 2-1, The Design and Implementation of 4.4BSD

Example: Forking Daytime Server See daytime2.c

Pipes A pipe is like a one-way socket Useful for communicating from parent to child, or vice versa Bundles two file descriptors together: – 0 th can be written to (analogous to stdin) – 1 st can be read from (analogous to stdout) Usual usage for parent to child comm (switch for child to parent comm) – Create pipe – Fork – Parent closes read side of pipe, writes to write side of pipe – Child closes write side of pipe, reads from read side of pipe

Duplicating Descriptors int dup2(intold_desc, intnew_desc) After execution, new_desc is a copy of old_desc Example: Sending stdout to stderr – 2 is fd for stderr by default – 1 is fd for stdout by default – dup2(2, 1)

Example Executing the equivalent of "cat /usr/share/dict/words | wc -l" See numwords.c

Resources IPC tutorial on assignment webpage Man pages Tutorials: – Beej’s Guide to Network Programming: – Beej’s Guide to Unix IPC: