




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1chapter eightflow control2flow controlerror detection and error correction are not enoughreceiver drops a packet when errors detectedreceiver cant correct errors in some packetsreceiver never receives a packetsolution: retransmit lost or corrupt packetsalso called arq (automatic-repeat-request) pro
2、tocolsuseful for communicating non-delay-sensitive data, e.g. web pages, files, email, even playback videocan incur too much delay for interactive audio/videoflow control (2)how does sender know a packet has been received properly?analogy: send a package by mail. how do i know it got there? certifie
3、d mail sends back a receipt. in some protocols, acknowledgements are sent by receiver back to sender confirming receipt of a packetwhen an acknowledgment doesnt arrive, then retransmitsenderreceiver1011000got it!flow control (3)the communication channel canlose packets (link layer and network layer)
4、delay packets (network layers)reorder packets (network layers)both the packet and the ack can be lostsenderreceiver1011000got it!flow control (4)if the packet is lost, at what point does the protocol retransmit? after a timeoutif the ack is lost, at what point does the protocol retransmit?after the
5、same timeoutsenderreceiver1011000got it!flow control (5)how does receiver know that sender got its acknowledgment?sender increments sequence number to #6 when acknowledgement #5 arrives. when receiver sees packet #6, it knows acknowledgement #5 made itsequence #s are also useful to send many packets
6、 at oncesenderreceiver0100110#6got #6flow control(6) to detect when a packet needs to be retransmitted, arq protocols must use both:acknowledgements, andtimeouts, sequence numbers:sender labels packets with themfor certain protocols, a sender can infer correct reception of the acknowledgement for a
7、packet with a lower sequence numberclickclicknextacks and nakstypes of acknowledgmentsacks positive acknowledgements = “ive received these packets”cumulativeselectivenaks negative acknowledgements = “i have not received these packets”acks are more prevalent than nakssenderreceiver0100110#6got #6got
8、roundtrip time, “” means “much greater than” lets approximate roundtrip time rtt = 2*( max propagation delay)example: if satellite link has prop. delay of 120 ms each way, then rtt = 240 ms. if timeout=1 min 240 ms, then send too slowly.if timeout is too short, then retransmit unnecessarily“too shor
9、t” means timeout roundtrip timeexample: if timeout = 1 ms rttsenderreceiverframeacknext frameacktimeoutperiodrtttimetimestop-and-wait protocol (2)if a timeout occurs before receiving an ack, the sender retransmits the frame.timesenderreceiverframeframeacktimeoutperiodorstop-and-wait protocol (3)if a
10、 timeout occurs before receiving an ack, the sender retransmits the frame.timesenderreceiverframeframeacktimeoutperiodstop-and-wait protocol (4)want timeout = rtt to avoid spurious retransmissions of a frame/packettimesenderreceiverframeframeackrttackunnecessary retransmissiontimeoutstop-and-wait pr
11、otocol (5)label each packet and ack with the proper sequence # to avoid confusion at receiver and sendersenderreceiverframe #1ack #1frame #2ack #2timeoutperiodrtttimetimeprotocol efficiency channel utiliation: the percentage of time the channel is transferring data frames (i.e. not including ack fra
12、mes) effective data rate: the actual number of data bits (as opposed to the raw bit rate) sent per unit of time parameters: r - transmission rate s - signal speed d - distance between sender and receiver t - time to create one frame f - number of bits in a data frame n - number of data bits in a fra
13、me a - number of bits in an acknowledgment time to send a frame to the receiver is t + f/r + d/s time to send an acknowledgment to the sender is t + a/r + d/sprotocol efficiency (cont.) for unrestricted and stop-and-wait protocols the elapsed time between sending two consecutive frames unrestricted:
14、 t+f/r stop and wait: (t+f/r+d/s) + (t+a/r+d/s) = 2(t+d/s) + (f+a)/r the channel utilization unrestricted: 100*(f/r)/(t+f/r) stop and wait:100*(f/r+d/s)/(2(t+d/s)+(f+a)/r) effective data rate unrestricted: n/(t+f/r) stop and wait :n/(2(t+d/s)+(f+a)/r)example assumptions: r - 10 mbps or 10 bits per s
15、ec s - 200 meters per sec d - 200 meters t - 1 sec f - 200 bits n - 160 bits a - 40 bitsexample (cont.) the channel utilization unrestricted: 100*(f/r)/(t+f/r) = 95% stop and wait: 100*(f/r+d/s)/(2(t+d/s)+(f+a)/r) = 75% effective data rate unrestricted: n/(t+f/r) = 7.6 mbps stop and wait n/(2(t+d/s)
16、+(f+a)/r) = 5.7 mbpsproblem with stop-and-waitonly one outstanding packet at a time = waste of link bandwidthexample: 1.5 mbps link with rtt 45 ms = a delay*bandwidth product = 1.5mbps*45ms=67.5 kb 8 kb. “pipe size” if frame size = 1 kb, then use only 1/8 of bandwidthsenderreceiverframe #1ack #1fram
17、e #2ack #2rtttimetime30designing efficient flow control protocolsalready seen one way to improve efficiency: choose timeout wiselyanother way to improve efficiency: “keep the pipe full” with new data packets and necessary retransmissionsstop-and-waitgo-back-nselective repeat protocol (srp)“keep the
18、pipe full”during one rtt, send n packetsexample: 1.5 mbps link with rtt 45 ms = a delay*bandwidth product = 67.5 kb 8 kb. “pipe size”if frame size = 1 kb, and n=3, then can have 3 outstanding packets, 3/8 of bw, and triple bandwidth utilization!senderreceiverrtttimetimeframe #1frame #2frame #3ack #3
19、ack #2ack #1go-back-n sliding window protocolmaintain a sliding window at both sender and receiver of unacknowledged packetssend window size (sws)at sender: lar (last ack received), lfs (last frame sent)sliding window:when ack #(lar+1) arrives, slide lar and lfs to rightlfs lar = sws retransmit enti
20、re windowlarlfsswsgo-back-n sliding window protocol (2)at receiver:maintain a receive window size (rws)at receiver: laf (largest acceptable frame), lfr (last frame received)sliding window:when frame arrives, keep it if its within windowif frame #(lfr+1) arrives, then slide window to right (increment
21、 lfr and laf)send back cumulative ack = lfr+1, laf lfr inefficientsome packets are retransmitted even though theyve already arrived at receiversolution: acknowledge each packet individually, or selectively, rather than cumulativelyselective repeat protocol (srp)selective acks sent by receiver identi
22、fy specifically which frame(s) have been received correctly in our example, the ack would contain info that only packets #7 and #10 have already arrived at receiversender only retransmits packets #6, #8,#9 and #11, and avoids resending #7 and #10“sliding” window in srp actually becomes much more complicat
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 循环经济视角下染料红FB生产废渣制备环保混凝土的化学键合机理
- 循环经济背景下凹凸纹纸废弃料化学回收技术路线探索
- 彩钢板屏风在开放式办公空间中的声学衰减与视觉通透性矛盾化解
- 建筑外立面维护周期延长需求与涂料耐候性衰减曲线的协同优化方案
- 三、设置项目符号说课稿-2023-2024学年初中信息技术(信息科技)七年级下册沪科版
- 2.手绘线条图像-物象空间的表达(说课稿)- -2024-2025学年人美版初中美术八年级上册
- 美妆集合店线上线下融合发展趋势分析报告
- 七年级体育 第十三课技巧(2)说课稿
- 10《父母多爱我》(教学设计)2023-2024学年统编版道德与法治三年级上册
- 中国邮政2025林芝市秋招揽投部储备干部岗位高频笔试题库含答案
- PCB设计检查表(评审检查表模板)
- 《运动治疗技术》第二章 关节活动技术-基础理论课件
- 国家职业技术技能标准 4-01-06-01 电子商务师S 人社厅发202233号
- 2024至2030年中国迷迭香精油行业投资前景及策略咨询研究报告
- 电梯维保服务应急处理方案
- 人教版小学数学四年级上册教案全集(表格式教案)
- 事业单位公开招聘报名表
- 医学教材 变态反应性疾病的诊疗进展标准版资料
- 生活垃圾发电厂炉渣综合处理及建筑垃圾资源化项目可行性研究报告写作模板-备案审批
- 跖骨骨折护理查房课件
- 癌症患者生活质量量表EORTC-QLQ-C30
评论
0/150
提交评论