Lecture 7: Organizing Game Clients and Servers
|
|
- Winfred Daniels
- 5 years ago
- Views:
Transcription
1 Lecture 7: Organizing Game Clients and Servers! Socket: communication endpoints Analogous to a file descriptor Apps read/write data to/from sockets system handles delivery IP address: IP-level name of a machine One IP address may map to multiple machines Multiple IP addresses may map to the same machine IP level does not care delivers packets to machine w/ IP address Port: Transport level name of a socket/endpoint Servers listen on a designated port number Clients send to (and listen for responses from) a port number When you create a socket, you typically bind it to a particular remote IP address and port number
2 "#$ %#& WSAStartup(); WSAEnumProtocols(); WSAStartup(); WSAEnumProtocols(); SERVER socket(); connect(); while (1) { send(); recv(); // Reply // Process reply closesocket(); WSACleanup(); CLIENT socket(); bind(); listen(); accept(); while (1) { recv(); // Request // Process reply send(); // Reply closesocket(); WSACleanup(); Windows-isms "#' %#& WSAStartup(); WSAEnumProtocols(); WSAStartup(); WSAEnumProtocols(); SERVER socket(); socket(); connect(); while (1) { send(); recv(); // Reply // Process reply close(); WSACleanup(); bind(); while (1) { recvfrom(); // Request // Process reply sendto(); // Reply close(); WSACleanup(); Windows-isms CLIENT ( #&# Problem: In our simple TCP servers, once we accept one client s connection, we ignore the rest! Solution: Need to keep listening for connection requests so that we can accept() them. How? Option 1: Create a truly concurrent server» Spawn a new thread or process per client (fork())» Use thread to listen for input from that client only Option 2: Fake concurrency» Use non-blocking I/O» Key system call select()
3 )$ %)** // Create TCP socket int sock = socket(af_inet, SOCK_STREAM, IPPROTO_TCP); // Set up address info struct sockadd_in adr; struct hostent *H = gethostbyname( foo.com ); adr.sin_family = AF_INET; adr.sin_port = htons(port); adr.sin_addr.s = INADDR_ANY; bzero(adr.sin_zero, 8); // Bind socket to address bind(sock, &adr, sizeof(adr)); // Go into passive mode listen(sock, 6); while (1) { struct sockaddr_in connaddr; int caddrsize; int newsock=accept(socket, &connaddr, &caddrsize); // Spawn handler switch(fork()) { case 0: // child comm(newsock, commadr); exit(); case -1: // error! exit (-1); default: close(newsock); break; &!#+,- Non-blocking I/O: Calls to I/O device (network) do not block if no data is ready How do we utilize asynchronous I/O? int on=1; ioctlsocket(socket, FIONBIO, &on); select(maxfd, readset, writeset, acceptset, timeout);» Returns if there is activity on any socket in sets of file descriptors described by {readset, writeset, acceptset)» Final parameter is timeout value if non-zero» If no activity on any socket, select() returns after timeout secs» Returns number of sockets ready (-1: error, 0: timeout )$ %#* int msgsock; char buf[1024]; fd_set rdy; // set of sockets int maxsocks; // Create TCP socket int sock = socket( ); // Set up address info struct sockaddr_in adr; adr.sin_family = ; bind(sock, &adr, sizeof(adr)); listen(sock,6); FD_ZERO(&rdy); // init empty FD_SET(sock, &rdy); // add socket while(1) { struct timeval to; to.tv_sec = 5; to.tv_usec = 0; // Any socket activity??? select(maxsocks, &rdy, 0, 0, &to); if (FD_ISSET(sock, &rdy)) { // Accept new connection msgsock = accept(sock, 0, 0); maxsocks++; else { // Process data
4 Which design do you think is preferable? Why? Concurrent server:» Much simpler communication infrastructure» Natural load balanacing» Need to worry about concurrency control (locking) Pseudo-concurrent (select)» Complex communication infrastructure» Need to worry about blocking I/O while processing request» Less need to worry about concurrency control What gets used in practice? Beats me, but I suspect largely event-drive, thread-oriented For large-scale systems, asynchronous I/O tends to scale better -.# General principles: Not all apply to games $/"#/ -. Dispatcher Client-server Clusters Peer-to-peer
5 #&/ Separation of functionality: Clients: Users (applications) who desire service Servers: Providers of service shared by (potentially) many clients Client-server in action: Clients bundle up request information into message(s) Use generic IPC mechanism to transmit requests to server Server examines message and performs requested action Server bundles up reply information Transmit reply to client Reply treated like syscall reply Requests Replies 1. NFS server (nfsd) starts up Open port 2049 (/etc/services) Blocks on recv() on socket 01 "# 2 recv() nfsd Server Stub 01 "# 2 1. NFS server (nfsd) starts up Open port 2049 (/etc/services) Blocks on recv() on socket 2. NFS client binds to nfsd Mount info identifies host Open socket to port 2049 on host Client Client Stub socket() nfsd Server Stub
6 01 "# 2 1. NFS server (nfsd) starts up Open port 2049 (/etc/services) Blocks on recv() on socket 2. NFS client binds to nfsd Mount info identifies host Open socket to port 2049 on host 3. NFS client invokes operation Operands encoded by client stub Client stub sends msg to server Client fread(buf,sz,file) Client Stub READ filename offset sz nfsd Server Stub 01 "# 2 1. NFS server (nfsd) starts up Open port 2049 (/etc/services) Blocks on recv() on socket 2. NFS client binds to nfsd Mount info identifies host Open socket to port 2049 on host 3. NFS client invokes operation Operands encoded by client stub Client stub sends msg to server 4. nfsd server stub receives msg Operands decoded by stub Operation invoked Results encoded & sent to client Client Stub Client fread(buf,sz,file) nfsd Server Stub data 01 "# 2 1. NFS server (nfsd) starts up Open port 2049 (/etc/services) Blocks on recv() on socket 2. NFS client binds to nfsd Client data Client Stub Mount info identifies host Open socket to port 2049 on host 3. NFS client invokes operation Operands encoded by client stub Client stub sends msg to server data 4. nfsd server stub receives msg Operands decoded by stub Operation invoked Results encoded & sent to client 5. NFS client receives response nfsd Server Stub Decodes response Returns from user call
7 0 1 "# How did client locate and bind to server? In this example, hostname from mount and well known port More generally need a directory service (e.g., ldap & portmap) How did client pass buffer to server (and back)? Cannot pass references need to create and pass copies of data Why did msg from client to server include filename? NFS is a stateless server does not maintain client state info Question: What are advantages/disadvantages of this design? How did server know what operation to invoke? Operation id encoded as part of request packet What kinds of operands can be passed? Easy: literals, strings, buffers Hard: trees, graphs, etc. ( #&$ / Idea: Implement service in a layered fashion Decompose service into individual components Build hierarchy of services Software engineering principle: hierarchical decomposition Three tiered system Client Business logic Backend storage Can extend hierarchy Just keep decomposing SAN ( #&/ / Business logic modules: Both clients and servers Export business logic to clients, store data in storage servers Question: Should they communicate with one another? How? Question: What issues arise if they communicate? Benefits? SAN: Storage Area Very high speed LAN (Gb/s) Fiberchannel, ATM, Infiband, Modern ones have RDMA (remote DMA) capabilities» Client can PUT/GET data directly to/from server memory» PUT/GET capabilities arbitrated via shared keys» Example: Infiniband Storage layer: Disks (network-attached storage) vs. filesystems vs. database
8 # If one server good multiple servers better? Issues: How do we distribute service across individual servers?» Do we replicate the entire service on all servers?» Do we divide service across servers? If so, how? How do we distribute requests across individual servers?» Do subsequent requests from same client go to same server?» Do we need to load balance and if so, how? How do we detect server failures? How do we keep state distributed across servers consistent?» How much state is exchanged between servers and when?» What happens when servers cannot talk for a while (e.g., failures or network partitions)? 3 4 ' #5 Examples of clusters: Clustered web servers (e.g., Yahoo, Google, etc.) Clustered file servers (e.g., VAXclusters) Compute clusters (e.g., Microsoft s Beowulf, Linux clusters, ) Distributing requests to individual nodes: Goals: High throughput, load balancing, efficient recovery Option 1: Round-robin DNS tricks Option 2: Dispatcher node (front end) Option 3: Client binding Option 4: Multicast Distributing services across servers Option 1: Fully replicated Option 2: Decomposed 0 1 "#' # 1. Client: GET IP address routes to cluster 2. Dispatcher chooses server Dynamic vs static decision? How is service distributed across cluster? What about load balancing? How do we handoff connections? 3. Server performs operation Reply to dispatcher? To client? Does connection persist? Does server store state? 4. Client receives response? Bound to server? If so, how? Clients Dispatcher Some issues: Web servers Stateful vs stateless servers Persistent connections vs cookies State management (consistency) Proxies (really separate issue)
9 ! / %"# Centralization is often a problem: Performance bottlenecks and hotspots Single point of failure less fault resistant Load imbalance Long latency Characteristics of a good distributed algorithm: No machine has/requires complete info about system state» Make decisions based on local information» Avoid single points of failure» Do not assume shared clock (global synchronization) Minimize inter-node communication» Caching and replication are very important (but problematic)» Piggyback info (#bytes less important than #messages)! / %"# Characteristics of a good distributed algorithm: Consider offloading work to clients» Replicating work can be ok» Often fits well with replication of data» Introduces its own set of issues Be judicious about using synchronous communication» Asynchronous communication generally more scalable» but introduces its own set of issues, too Minimize synchronization requirements» Takes a long time to come to global agreement Distribute work across nodes» Load balancing (even simple, static) can significantly improve scalability But trying to squeeze out the last bit often futile and counter-productive! / %"# Separate policy from mechanism Encapsulation is good (components, IDLs, ) System provides mechanisms Users/admins choose policies Designers need to avoid imposing policies in their designs Layered protocols Decompose functionality into independent layers Layers logically communicate with their peer on remote machine Advantage: Modularity» Each layer is relatively simple and independently built/tested» Can replace a layer w/o affecting other layers (e.g., IPv6)» Independent failure modes Disadvantage: Lose information at layer boundaries slower
10 ( %"# End-to-end argument: Consider carefully where you put functionality in a complex system Only put functionality in middle if won t be replicated at ends Example: Reliable end-to-end communication (e.g., TCP) vs hopby-hop link layer reliability Saltzer, Reed, and Clark: End-to-End Arguments in System Design, ACM Transaction on Computer Systems, Nov Design issues to consider: Interrupts are expensive Storage/memory costs have plummeted Computation is typically less of a bottleneck than communication Bandwidth is easier to buy/build than latency '" 6 Next time Discussion of MazeWar project Two-person teams Project handouts will be online later today Due in ~3 weeks, including 1 st week writing design documents Next Tuesday 1 st paper discussion (tentative) I will lead the first discussions You need to» Read and think about the papers» Prepare evaluations before class» Take part in the discussion Afterwards lots of student-led discussion for a while (initial set of papers online soon)
"#' %#& Lecture 7: Organizing Game Clients and Servers. Socket: Network communication endpoints. IP address: IP-level name of a machine
Lecture 7: Organizing Game s and Servers! Socket: communication endpoints Analogous to a file descriptor Apps read/write to/from sockets system handles delivery IP address: IP-level name of a machine One
More informationLecture 15: Network File Systems
Lab 3 due 12/1 Lecture 15: Network File Systems CSE 120: Principles of Operating Systems Alex C. Snoeren Network File System Simple idea: access disks attached to other computers Share the disk with many
More informationCS 43: Computer Networks. 07: Concurrency and Non-blocking I/O Sep 17, 2018
CS 43: Computer Networks 07: Concurrency and Non-blocking I/O Sep 17, 2018 Reading Quiz Lecture 5 - Slide 2 Today Under-the-hood look at system calls Data buffering and blocking Inter-process communication
More informationCS118 Discussion 1A, Week 3. Zengwen Yuan Dodd Hall 78, Friday 10:00 11:50 a.m.
CS118 Discussion 1A, Week 3 Zengwen Yuan Dodd Hall 78, Friday 10:00 11:50 a.m. 1 Outline Application Layer Protocol: DNS, CDN, P2P Transport Layer Protocol: UDP, principles of reliable transport protocol
More informationSocket Programming. Dr. -Ing. Abdalkarim Awad. Informatik 7 Rechnernetze und Kommunikationssysteme
Socket Programming Dr. -Ing. Abdalkarim Awad Informatik 7 Rechnernetze und Kommunikationssysteme Before we start Can you find the ip address of an interface? Can you find the mac address of an interface?
More informationNETWORK PROGRAMMING. Instructor: Junaid Tariq, Lecturer, Department of Computer Science
NETWORK PROGRAMMING CSC- 341 25 Instructor: Junaid Tariq, Lecturer, Department of Computer Science 26 9 Lecture Sockets as means for inter-process communication (IPC) application layer Client Process Socket
More informationCSE 43: Computer Networks Structure, Threading, and Blocking. Kevin Webb Swarthmore College September 14, 2017
CSE 43: Computer Networks Structure, Threading, and Blocking Kevin Webb Swarthmore College September 14, 2017 1 Agenda Under-the-hood look at system calls Data buffering and blocking Processes, threads,
More informationECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017
ECE 550D Fundamentals of Computer Systems and Engineering Fall 2017 The Operating System (OS) Prof. John Board Duke University Slides are derived from work by Profs. Tyler Bletsch and Andrew Hilton (Duke)
More informationThe User Datagram Protocol
The User Datagram Protocol Stefan D. Bruda Winter 2018 UDP Very similar to the TCP in terms of API Dissimilar with TCP in terms of innards (and hence programming techniques) Many-to-many communication.
More informationCPS 214: Computer Networks. Slides by Adolfo Rodriguez
CPS 214: Computer Networks Slides by Adolfo Rodriguez Paper Evaluations 1 page maximum evaluation of reading for each class Evaluations submitted in advance of class from course Web page Describe: Biggest
More information416 Distributed Systems. Networks review; Day 2 of 2 Fate sharing, e2e principle And start of RPC Jan 10, 2018
416 Distributed Systems Networks review; Day 2 of 2 Fate sharing, e2e principle And start of RPC Jan 10, 2018 1 Last Time Modularity, Layering, and Decomposition Example: UDP layered on top of IP to provide
More informationSocket Programming for TCP and UDP
CSCI4430 Data Communication and Computer Networks Socket Programming for TCP and UDP ZHANG, Mi Jan. 19, 2017 Outline Socket Programming for TCP Introduction What is TCP What is socket TCP socket programming
More informationClient Server Computing
Client Server Computing Although the Internet provides a basic communication service, the protocol software cannot initiate contact with, or accept contact from, a remote computer. Instead, two application
More informationBackground: I/O Concurrency
Background: I/O Concurrency Brad Karp UCL Computer Science CS GZ03 / M030 5 th October 2011 Outline Worse Is Better and Distributed Systems Problem: Naïve single-process server leaves system resources
More informationIntroduction and Overview Socket Programming Lower-level stuff Higher-level interfaces Security. Network Programming. Samuli Sorvakko/Nixu Oy
Network Programming Samuli Sorvakko/Nixu Oy Telecommunications software and Multimedia Laboratory T-110.4100 Computer Networks October 5, 2009 Agenda 1 Introduction and Overview 2 Socket Programming 3
More informationCS118 Discussion Week 2. Taqi
CS118 Discussion Week 2 Taqi Outline Any Questions for Course Project 1? Socket Programming: Non-blocking mode Lecture Review: Application Layer Much of the other related stuff we will only discuss during
More informationLecture 24. Thursday, November 19 CS 375 UNIX System Programming - Lecture 24 1
Lecture 24 Log into Linux. Copy directory /home/hwang/cs375/lecture24 Final project posted. Due during finals week. Reminder: No class next Tuesday (11/24) Questions? Thursday, November 19 CS 375 UNIX
More informationSocket Programming. Omer Ozarslan
Socket Programming Omer Ozarslan omer@utdallas.edu 1 Outline Background Using TCP Example: hello_tcp Using UDP Example: hello_udp Blocking Calls and Threads Some Advises Code Examples Questions 2 Socket
More informationUDP CONNECT TO A SERVER
UDP The User Datagram Protocol Stefan D. Bruda Winter 2018 Very similar to the TCP in terms of API Dissimilar with TCP in terms of innards (and hence programming techniques) Many-to-many communication.
More informationSend me up to 5 good questions in your opinion, I ll use top ones Via direct message at slack. Can be a group effort. Try to add some explanation.
Notes Midterm reminder Second midterm next week (04/03), regular class time 20 points, more questions than midterm 1 non-comprehensive exam: no need to study modules before midterm 1 Online testing like
More informationChristian Tschudin (basierend auf einem Foliensatz von C. Jelger und T. Meyer) Departement Mathematik und Informatik, Universität Basel
Internettechnologien (CS262) Socket Programming in C 4. März 2015 Christian Tschudin (basierend auf einem Foliensatz von C. Jelger und T. Meyer) Departement Mathematik und Informatik, Universität Basel
More informationTypes (Protocols) Associated functions Styles We will look at using sockets in C Java sockets are conceptually quite similar
Socket Programming What is a socket? Using sockets Types (Protocols) Associated functions Styles We will look at using sockets in C Java sockets are conceptually quite similar - Advanced Data Communications:
More informationLecture 8: February 19
CMPSCI 677 Operating Systems Spring 2013 Lecture 8: February 19 Lecturer: Prashant Shenoy Scribe: Siddharth Gupta 8.1 Server Architecture Design of the server architecture is important for efficient and
More informationSOCKET PROGRAMMING. What is a socket? Using sockets Types (Protocols) Associated functions Styles
LABORATORY SOCKET PROGRAMMING What is a socket? Using sockets Types (Protocols) Associated functions Styles 2 WHAT IS A SOCKET? An interface between application and network The application creates a socket
More informationChapter 6. The Transport Layer. Transport Layer 3-1
Chapter 6 The Transport Layer Transport Layer 3-1 Transport services and protocols provide logical communication between app processes running on different hosts transport protocols run in end systems
More informationAssignment 2 Group 5 Simon Gerber Systems Group Dept. Computer Science ETH Zurich - Switzerland
Assignment 2 Group 5 Simon Gerber Systems Group Dept. Computer Science ETH Zurich - Switzerland t Your task Write a simple file server Client has to be implemented in Java Server has to be implemented
More informationIntroduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy
Network Programming Samuli Sorvakko/Nixu Oy Telecommunications software and Multimedia Laboratory T-110.4100 Computer Networks October 16, 2008 Agenda 1 Introduction and Overview Introduction 2 Socket
More informationInternet Connectivity with
Internet Connectivity with Introduction The purpose of this workshop is to help you g et acquainted with the basics of internet connectivity by leveraging ARM mbed tools. If you are not already familiar
More informationSockets 15H2. Inshik Song
Sockets 15H2 Inshik Song Internet CAU www server (www.cau.ac.kr) Your web browser (Internet Explorer/Safari) Sockets 2 How do we find the server? Every computer on the Internet has an Internet address.
More informationSystem that permanently stores data Usually layered on top of a lower-level physical storage medium Divided into logical units called files
System that permanently stores data Usually layered on top of a lower-level physical storage medium Divided into logical units called files Addressable by a filename ( foo.txt ) Usually supports hierarchical
More informationInternet Technology. 06. Exam 1 Review Paul Krzyzanowski. Rutgers University. Spring 2016
Internet Technology 06. Exam 1 Review Paul Krzyzanowski Rutgers University Spring 2016 March 2, 2016 2016 Paul Krzyzanowski 1 Question 1 Defend or contradict this statement: for maximum efficiency, at
More informationCommunication. Communication. Distributed Systems. Networks and protocols Sockets Remote Invocation Messages Streams. Fall /10/2001 DoCS
Communication Distributed Systems Fall 2002 Communication Process Process Networks and protocols Sockets Remote Invocation Messages Streams 9/10/2001 DoCS 2002 2 Layered Protocols (1) Layers, interfaces,
More informationΕργαστήριο 9 I/O Multiplexing
Εργαστήριο 9 I/O Multiplexing Στοεργαστήριοθαμελετηθούν: Server High Level View I/O Multiplexing Solutions for Concurrency nonblocking I/O Use alarm and signal handler to interrupt slow system calls. Use
More informationServer algorithms and their design
Server algorithms and their design slide 1 many ways that a client/server can be designed each different algorithm has various benefits and problems are able to classify these algorithms by looking at
More informationInterprocess Communication Mechanisms
Interprocess Communication 1 Interprocess Communication Mechanisms shared storage These mechanisms have already been covered. examples: shared virtual memory shared files processes must agree on a name
More informationshared storage These mechanisms have already been covered. examples: shared virtual memory message based signals
Interprocess Communication 1 Interprocess Communication Mechanisms shared storage These mechanisms have already been covered. examples: shared virtual memory shared files processes must agree on a name
More informationA Client-Server Exchange
Socket programming A Client-Server Exchange A server process and one or more client processes Server manages some resource. Server provides service by manipulating resource for clients. 1. Client sends
More informationDistributed Systems. 02. Networking. Paul Krzyzanowski. Rutgers University. Fall 2017
Distributed Systems 02. Networking Paul Krzyzanowski Rutgers University Fall 2017 1 Inter-computer communication Without shared memory, computers need to communicate Direct link Direct links aren't practical
More informationCloud Computing CS
Cloud Computing CS 15-319 Distributed File Systems and Cloud Storage Part I Lecture 12, Feb 22, 2012 Majd F. Sakr, Mohammad Hammoud and Suhail Rehman 1 Today Last two sessions Pregel, Dryad and GraphLab
More informationInterprocess Communication
Interprocess Communication B.Ramamurthy CSE421 11/5/02 B.R 1 Topics Pipes (process level) Sockets (OS level) Distributed System Methods (Java s) Remote Method Invocation (PL Level) Other communication
More informationKey Points for the Review
Key Points for the Review Network Basics What is internet and Internet? Does WWW equal to Internet? How do machines communicate with one another on the Internet? What are the major components of Internet?
More informationCSC209H Lecture 10. Dan Zingaro. March 18, 2015
CSC209H Lecture 10 Dan Zingaro March 18, 2015 Creating a Client To create a client that can connect to a server, call the following, in order: socket: create a communication endpoint This is the same as
More informationThe basic server algorithm. Server algorithms and their design. Problems with the simple server? Servers. overview ofaserver
Server algorithms and their design slide 1 The basic server algorithm slide 2 many ways that a client/server can be designed overview ofaserver each different algorithm has various benefits and problems
More informationGPUnet: Networking Abstractions for GPU Programs. Author: Andrzej Jackowski
Author: Andrzej Jackowski 1 Author: Andrzej Jackowski 2 GPU programming problem 3 GPU distributed application flow 1. recv req Network 4. send repl 2. exec on GPU CPU & Memory 3. get results GPU & Memory
More informationNetworks and distributed computing
Networks and distributed computing Abstractions provided for networks network card has fixed MAC address -> deliver message to computer on LAN -> machine-to-machine communication -> unordered messages
More informationNetwork Software Implementations
Network Software Implementations Number of computers on the Internet doubling yearly since 1981, nearing 200 million Estimated that more than 600 million people use the Internet Number of bits transmitted
More informationSocket Programming. Sungkyunkwan University. Hyunseung Choo Copyright Networking Laboratory
Socket Programming Sungkyunkwan University Hyunseung Choo choo@skku.edu Copyright 2000-2019 Networking Laboratory Contents Goals Client-Server mechanism Introduction to socket Programming with socket on
More informationLab 2: Threads and Processes
CS333: Operating Systems Lab Lab 2: Threads and Processes Goal The goal of this lab is to get you comfortable with writing basic multi-process / multi-threaded applications, and understanding their performance.
More informationInternet Technology 3/2/2016
Question 1 Defend or contradict this statement: for maximum efficiency, at the expense of reliability, an application should bypass TCP or UDP and use IP directly for communication. Internet Technology
More informationRandall Stewart, Cisco Systems Phill Conrad, University of Delaware
SCTP: An Overview Randall Stewart, Cisco Systems Phill Conrad, University of Delaware 1 Our Objectives Be able to explain what SCTP is, and what its major features are when and why you might use it (instead
More informationPROCESS CONCEPTS. Process Concept Relationship to a Program What is a Process? Process Lifecycle Process Management Inter-Process Communication 2.
[03] PROCESSES 1. 1 OUTLINE Process Concept Relationship to a Program What is a Process? Process Lifecycle Creation Termination Blocking Process Management Process Control Blocks Context Switching Threads
More informationCSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files
CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files ... and systems programming C basic syntax functions arrays structs
More informationCSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.
CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files... and systems programming C basic syntax functions arrays structs
More informationDistributed systems. Lecture 6: distributed transactions, elections, consensus and replication. Malte Schwarzkopf
Distributed systems Lecture 6: distributed transactions, elections, consensus and replication Malte Schwarzkopf Last time Saw how we can build ordered multicast Messages between processes in a group Need
More informationCSC 4900 Computer Networks: End-to-End Design
CSC 4900 Computer Networks: End-to-End Design Professor Henry Carter Fall 2017 Villanova University Department of Computing Sciences Review In the last two lectures, we discussed the fundamentals of networking
More informationLarge Systems: Design + Implementation: Communication Coordination Replication. Image (c) Facebook
Large Systems: Design + Implementation: Image (c) Facebook Communication Coordination Replication Credits Slides largely based on Distributed Systems, 3rd Edition Maarten van Steen Andrew S. Tanenbaum
More informationApplication Layer Introduction; HTTP; FTP
Application Layer Introduction; HTTP; FTP Tom Kelliher, CS 325 Feb. 4, 2011 1 Administrivia Announcements Assignment Read 2.4 2.6. From Last Time Packet-switched network characteristics; protocol layers
More informationMemory-Mapped Files. generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length)
File Systems 38 Memory-Mapped Files generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length) mmap call returns the virtual address to which the file is mapped munmap call unmaps
More informationNetwork Implementation
CS 256/456: Operating Systems Network Implementation John Criswell! University of Rochester 1 Networking Overview 2 Networking Layers Application Layer Format of Application Data Transport Layer Which
More informationProject 3. Reliable Data Transfer over UDP. NTU CSIE Computer Networks 2011 Spring
Project 3 Reliable Data Transfer over UDP NTU CSIE Computer Networks 2011 Spring Project Goal In Project 3, students are asked to understand and implement reliable data transfer mechanism over UDP. UDP
More informationNetwork Communication
Network Communication Processes communicating Process: program running within a host. q within same host, two processes communicate using inter- process communica6on (defined by OS). q processes in different
More informationToday: VM wrap-up Select (if time) Course wrap-up Final Evaluations
Today: VM wrap-up Select (if time) Course wrap-up Final Evaluations Program structure int A[1024][1024] ; Each row is stored in one page Ignore code page in this example One frame allocated Program 1 for
More informationAdvanced Distributed Systems
Course Plan and Department of Computer Science Indian Institute of Technology New Delhi, India Outline Plan 1 Plan 2 3 Message-Oriented Lectures - I Plan Lecture Topic 1 and Structure 2 Client Server,
More informationOutline. Distributed Computer Systems. Socket Basics An end-point for a IP network connection. Ports. Sockets and the OS. Transport Layer.
Outline Distributed Computer Systems Socket basics Socket details (TCP and UDP) Socket options Final notes Sockets Socket Basics An end-point for a IP network connection what the application layer plugs
More informationRemote Procedure Call
Remote Procedure Call Remote Procedure Call Integrate network communication with programming language Procedure call is well understood implementation use Control transfer Data transfer Goals Easy make
More informationCMSC 322 Computer Networks Applications and End-To- End
CMSC 322 Computer Networks Applications and End-To- End Professor Doug Szajda CMSC 332: Computer Networks Announcements Project 2 has been posted and is due Monday, February 8 (No extension!) Homework
More informationSockets. Dong-kun Shin Embedded Software Laboratory Sungkyunkwan University Embedded Software Lab.
1 Sockets Dong-kun Shin Embedded Software Laboratory Sungkyunkwan University http://nyx.skku.ac.kr Internet Connections (1) 2 Connection Clients and servers communicate by sending streams of bytes over
More information416 Distributed Systems. Networks review; Day 2 of 2 And start of RPC Jan 13, 2016
416 Distributed Systems Networks review; Day 2 of 2 And start of RPC Jan 13, 2016 1 Last Time Modularity, Layering, and Decomposition Example: UDP layered on top of IP to provide application demux ( ports
More informationCS 856 Latency in Communication Systems
CS 856 Latency in Communication Systems Winter 2010 Latency Challenges CS 856, Winter 2010, Latency Challenges 1 Overview Sources of Latency low-level mechanisms services Application Requirements Latency
More informationHybrid of client-server and P2P. Pure P2P Architecture. App-layer Protocols. Communicating Processes. Transport Service Requirements
Announcements CS 5565 Network Architecture and Protocols Lecture 5 Godmar Back Problem Set 1 due Feb 17 Project 1 handed out shortly 2 Layer The Layer Let s look at some s (in keeping with top-down) architectures:
More informationCISC2200 Threads Spring 2015
CISC2200 Threads Spring 2015 Process We learn the concept of process A program in execution A process owns some resources A process executes a program => execution state, PC, We learn that bash creates
More informationNetworking and Internetworking 1
Networking and Internetworking 1 Today l Networks and distributed systems l Internet architecture xkcd Networking issues for distributed systems Early networks were designed to meet relatively simple requirements
More informationCS 351 Week 15. Course Review
CS 351 Week 15 Course Review Objectives: 1. To review the contents from different weeks. 2. To have a complete understanding of important concepts from different weeks. Concepts: 1. Important Concepts
More informationCS350: Final Exam Review
University of Waterloo CS350: Final Exam Review Gwynneth Leece, Andrew Song, Rebecca Putinski Winter, 2010 Intro, Threads & Concurrency What are the three views of an operating system? Describe them. Define
More informationAsynchronous Events on Linux
Asynchronous Events on Linux Frederic.Rossi@Ericsson.CA Open System Lab Systems Research June 25, 2002 Ericsson Research Canada Introduction Linux performs well as a general purpose OS but doesn t satisfy
More informationContext. Distributed Systems: Sockets Programming. Alberto Bosio, Associate Professor UM Microelectronic Departement
Distributed Systems: Sockets Programming Alberto Bosio, Associate Professor UM Microelectronic Departement bosio@lirmm.fr Context Computer Network hosts, routers, communication channels Hosts run applications
More informationEECS122 Communications Networks Socket Programming. Jörn Altmann
EECS122 Communications Networks Socket Programming Jörn Altmann Questions that will be Addressed During the Lecture What mechanisms are available for a programmer who writes network applications? How to
More informationDistributed Architectures & Microservices. CS 475, Spring 2018 Concurrent & Distributed Systems
Distributed Architectures & Microservices CS 475, Spring 2018 Concurrent & Distributed Systems GFS Architecture GFS Summary Limitations: Master is a huge bottleneck Recovery of master is slow Lots of success
More informationCS454/654 Midterm Exam Fall 2004
CS454/654 Midterm Exam Fall 2004 (3 November 2004) Question 1: Distributed System Models (18 pts) (a) [4 pts] Explain two benefits of middleware to distributed system programmers, providing an example
More informationCSC369 Lecture 2. Larry Zhang
CSC369 Lecture 2 Larry Zhang 1 Announcements Lecture slides Midterm timing issue Assignment 1 will be out soon! Start early, and ask questions. We will have bonus for groups that finish early. 2 Assignment
More informationCS2506 Quick Revision
CS2506 Quick Revision OS Structure / Layer Kernel Structure Enter Kernel / Trap Instruction Classification of OS Process Definition Process Context Operations Process Management Child Process Thread Process
More information02 - Distributed Systems
02 - Distributed Systems Definition Coulouris 1 (Dis)advantages Coulouris 2 Challenges Saltzer_84.pdf Models Physical Architectural Fundamental 2/58 Definition Distributed Systems Distributed System is
More informationProcesses COMPSCI 386
Processes COMPSCI 386 Elements of a Process A process is a program in execution. Distinct processes may be created from the same program, but they are separate execution sequences. call stack heap STACK
More informationLast Time. Internet in a Day Day 2 of 1. Today: TCP and Apps
Internet in a Day Day 2 of 1 Carnegie Mellon University 15-440, Distributed Systems Last Time Modularity, Layering, and Decomposition Example: UDP layered on top of IP to provide application demux ( ports
More information02 - Distributed Systems
02 - Distributed Systems Definition Coulouris 1 (Dis)advantages Coulouris 2 Challenges Saltzer_84.pdf Models Physical Architectural Fundamental 2/60 Definition Distributed Systems Distributed System is
More informationDistributed File Systems
Distributed File Systems Today l Basic distributed file systems l Two classical examples Next time l Naming things xkdc Distributed File Systems " A DFS supports network-wide sharing of files and devices
More information416 Distributed Systems. Networks review; Day 1 of 2 Jan 5 + 8, 2018
416 Distributed Systems Networks review; Day 1 of 2 Jan 5 + 8, 2018 1 Distributed Systems vs. Networks Low level (c/go) Run forever Support others Adversarial environment Distributed & concurrent Resources
More informationDepartment of Computer Science
Department of Computer Science Notes on Interprocess Communication in Unix Jean Dollimore,Oct.1990, last revised Feb. 1996 These notes explain how you can write "distributed programs" in C or C++ running
More informationCS307 Operating Systems Processes
CS307 Processes Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2018 Process Concept Process a program in execution An operating system executes a variety of
More informationProcesses. Process Concept. The Process. The Process (Cont.) Process Control Block (PCB) Process State
CS307 Process Concept Process a program in execution Processes An operating system executes a variety of programs: Batch system jobs Time-shared systems user programs or tasks All these activities are
More informationDistributed Systems 8. Remote Procedure Calls
Distributed Systems 8. Remote Procedure Calls Paul Krzyzanowski pxk@cs.rutgers.edu 10/1/2012 1 Problems with the sockets API The sockets interface forces a read/write mechanism Programming is often easier
More informationOperating Systems. Review ENCE 360
Operating Systems Review ENCE 360 High level Concepts What are three conceptual pieces fundamental to operating systems? High level Concepts What are three conceptual pieces fundamental to operating systems?
More informationNFS Design Goals. Network File System - NFS
Network File System - NFS NFS Design Goals NFS is a distributed file system (DFS) originally implemented by Sun Microsystems. NFS is intended for file sharing in a local network with a rather small number
More informationNetworking Subsystem in Linux. Manoj Naik IBM Almaden Research Center
Networking Subsystem in Linux Manoj Naik IBM Almaden Research Center Scope of the talk Linux TCP/IP networking layers Socket interfaces and structures Creating and using INET sockets Linux IP layer Socket
More information! " Lecture 5: Networking for Games (cont d) Packet headers. Packet footers. IP address. Edge router (cable modem, DSL modem)
Lecture 5: Networking for Games (cont d) Special Send case: to NAT 123.12.2.10 network 192.168.1.101 17.4.9.33 192.168.1.100 123.12.2.[0-128] IP address 23.11.3.10 Edge router (cable modem, DSL modem)
More informationIntroduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy
Network Programming Samuli Sorvakko/Nixu Oy Telecommunications software and Multimedia Laboratory T-110.4100 Computer Networks October 9, 2006 Agenda 1 Introduction and Overview Introduction 2 Socket Programming
More informationOral. Total. Dated Sign (2) (5) (3) (2)
R N Oral Total Dated Sign (2) (5) (3) (2) Assignment Group- A_07 Problem Definition Write a program using TCP socket for wired network for following Say Hello to Each other ( For all students) File transfer
More informationSimple network applications using sockets (BSD and WinSock) Revision 1 Copyright Clifford Slocombe
Simple network applications using sockets (BSD and WinSock) Revision 1 Copyright 2002 - Clifford Slocombe sockets@slocombe.clara.net COPYRIGHT 2002 - CLIFFORD SLOCOMBE PAGE 1 OF 8 Table of Contents Introduction...3
More informationInterprocess Communication
Interprocess Communication Nicola Dragoni Embedded Systems Engineering DTU Informatics 4.2 Characteristics, Sockets, Client-Server Communication: UDP vs TCP 4.4 Group (Multicast) Communication The Characteristics
More informationCSC209 Review. Yeah! We made it!
CSC209 Review Yeah! We made it! 1 CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files 2 ... and C programming... C basic syntax functions
More information