CS241 System Programming Introduction to Communication (I)ContentMotivationNetwork CategoryNetwork CategoriesClient-Server ModelCommunication ChannelClient-Server Model/ExamplesNaming of Servers and ClientsPortsKinds of CommunicationExamples of Protocols for Client-Server Process CommunicationTCP/IP Protocol LayersConnection-oriented Communication ProtocolConnection-Oriented CommunicationsIllustrationConnection-Oriented Server StrategiesMultiple Clients (Serial-server Strategy)Parent-server StrategyThreaded-server StrategySummaryCS241 System Programming Introduction to Communication (I)Klara NahrstedtLecture 344/14/2006Contentz Communication – Motivation – Network Categories and Applications z Client-Server Model– Communication Channels– Naming of Client/Server– Types of Communication and Protocols– Connection-oriented Server StrategiesMotivationz Share: workstation, PC, Cray, database, radio telescope, work z resource sharing z computation speed up z reliability z communicationNetwork Categoryz Resource Sharing Networks. – Communication is typically between a user process on one host and a resource manager process on another host. – Examples:z Access remote files z Transfer files between hosts z Database distributed among hosts z Access peripheral device (e.g., printer) on remote host zDistributed Computation Networks.– A group of processes cooperating in one activity are distributed over several hosts throughout a network. – Examples:z Large database systems z Real time process-control systemsNetwork Categories z Remote Communication Networks. – Typically a batch system with most facilities in one or a few central locations, accessed from many remote locations. – Examples:z Bank ATMsClient-Server Modelz The client-server model is used in many types of network communication including mail, ftp, telnet, rlogin, http, and nfs. z In this model, the server waits for requests and the client makes requests for service from the server. Communication End Point Communication End PointServer ClientCommunication ChannelExchange MessagesCommunication ChannelOne way Channel Two-way ChannelCSS CSymmetric ChannelAsymmetric Ch.SCSC-- Shared Channel-- Private ChannelClient-Server Model/ExamplesIPC (e.g., Pipes)Network (e.g., LAN)Naming of Servers and Clientsz In Network environment – naming is difficultz Possible Server naming by Process ID and Host ID– Problem: Client cannot know the process ID of the server process on a host in advancez Most common naming – use address of host(Internet address) and an integer called port numberPortsz Ports < 1024, standardz Ports > 1024, user createdz Well-known Port Numbers – mail: 25 – ftp: 21 – telnet: 23 – rlogin 513 – http: 80 – nfs: 2049 z IP address (161.25.19.8)Kinds of Communicationz In connectionless communication, the client makes a request to an endpoint on a server and the server can respond to the client's endpoint (that is included in the client request). z In connection-oriented communication, the client sets up a connection using the server's well-known port number and then communicates over a private communications channel as shownExamples of Protocols for Client-Server Process Communication z Connectionless – UDP (Unreliable Datagram Protocol)– Unreliable – no retransmission z Connection-oriented – TCP (Transmission Control Protocol – Three-way hand-shake between initiator and destination– Receiver sends acknowledgement– In case sender does not get acknowledgement within certain time, it retransmits message (packet)– Flow ControlTCP/IP Protocol LayersEND USER APPLICATIONIEEE802.XIPTCP UDPFTP, TELNET, SMTP, NSP, SNMPLAN/WANLayers 5-7Layers 1-3Layers 4System InterfaceWe willstudyUser SpaceProcessesKernelConnection-oriented Communication Protocol 1. Server monitors a passive end-point whose address is known to clients1. Listening (passive) endpoints have resources for queuing client connection requests and establishing client connections2. Action of accepting a client request creates a new endpoint for private, two-way symmetric communication with that client3. Client and server communicate by using handles (file descriptors) and do not explicitly include addresses in their messages4. When finished, client and server close their file descriptors, system releases resources associated with the connectionConnection-Oriented CommunicationsIllustrationConnection-Oriented Server Strategiesz Serial-server strategyz Parent-server strategyz Threaded-server strategyMultiple Clients (Serial-server Strategy)Parent-server StrategyThreaded-server StrategythreadSummaryz Client-Server Process Communication – Communication Channel– Communication Protocols – Connectionless vs Connection-oriented– Connection-oriented Server
View Full Document