中国高校课件下载中心 》 教学资源 》 大学文库

台北科技大学:《计算机网络》(英文版) NP04 16 multi proto

文档信息
资源类别:文库
文档格式:PPT
文档页数:7
文件大小:70.5KB
团购合买:点击进入团购
内容简介
Introduction Single thread for multiple transport protocols Motivation Server design and process structure An iterative example Concurrent multiprotocol servers
刷新页面文档预览

Multiprotocol Servers Chuan-Ming Liu Computer Science and Information Engineering Spring 2004, NTUt TAIWAN CSIE NTUT Taiwan

1 CSIE, NTUT, Taiwan Multiprotocol Servers Chuan-Ming Liu Computer Science and Information Engineering Spring 2004, NTUT TAIWAN

●●。 Introduction o Single thread for multiple transport protocols o Motivation o Server design and process structure o An iterative example o Concurrent multiprotocol servers SIE NTUT. Taiwan

2 CSIE, NTUT, Taiwan Introduction  Single thread for multiple transport protocols  Motivation  Server design and process structure  An iterative example  Concurrent multiprotocol servers

●● Motivation o Same service but with different transport protocols, for example, DAYTIME service can via tcp or udp Single protocol server is easy to maintain but results in replication - same service with different protocols may have the same piece of code o Ea ach single protocol server needs its own resource -result in unnecessarily consuming process table entries and system resources SIE NTUT. Taiwan

3 CSIE, NTUT, Taiwan Motivation  Same service but with different transport protocols, for example, DAYTIME service can via TCP or UDP  Single protocol server is easy to maintain but results in replication – same service with different protocols may have the same piece of code  Each single protocol server needs its own resource – result in unnecessarily consuming process table entries and system resources

o Single Thread Multiprotocol o Use asynchronous I/o to handle communication o Initially, open two sockets: one for tCP and the other is for UDP o Then wait for one of the two sockets to be rea e If TCP is ready the server uses accept to make a new connection o If udP is ready, the server uses UDP service to serve the client 4 SIE NTUT. Taiwan

4 CSIE, NTUT, Taiwan Single Thread Multiprotocol  Use asynchronous I/O to handle communication  Initially, open two sockets: one for TCP and the other is for UDP  Then, wait for one of the two sockets to be ready ⚫ If TCP is ready, the server uses accept to make a new connection ⚫ If UDP is ready, the server uses UDP service to serve the client

●●。 Process structure Server Application rocesses Socket for Socket for Sockets for+OS UDP CP a TcP requests requests connections 5 SIE NTUT. Taiwan

5 CSIE, NTUT, Taiwan Process Structure Server OS Application Processes Socket for UDP requests Sockets for a TCP connections Socket for TCP requests

MultiprotOcol DAYTIME ●●● Server o Program daytime.C o Shared code o Single procedure can be used by different protocols ● easy to maintain o In the example function daytime is the Shared code 6 SIE, NTUT, Taiwan

6 CSIE, NTUT, Taiwan Multiprotocol DAYTIME Server  Program daytimed.c  Shared code ⚫ Single procedure can be used by different protocols ⚫ Easy to maintain ⚫ In the example, function daytime is the shared code

●●● Concurrent Multiprotocol Server o Why using iterative for DAYTIME server o What we had learned for currency can be also extended to implement multiprotocol servers o More protocols and ports number can be foundinrfc1700.http://www.cis.ohio state. edu/cgi-bin/rfc/rfcl700html SIE NTUT. Taiwan

7 CSIE, NTUT, Taiwan Concurrent Multiprotocol Server  Why using iterative for DAYTIME server?  What we had learned for currency can be also extended to implement multiprotocol servers  More protocols and ports number can be found in RFC 1700, http://www.cis.ohio￾state.edu/cgi-bin/rfc/rfc1700.html

已到末页,全文结束
刷新页面下载完整文档
VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
相关文档