(1) Stop-and-Wait Flow Control 工作方式 发送方:传一个帧; 接收方:收到后,发回一个确认,表示愿意接收下一帧 发送方:等待,直到收到确认信息 若接收方不发确认,则简单中止传输。 帧的长度不能太长。 A source need to break up a large block of data into smaller blocks and transmit the data in many frames 原因 (1) The buffer size of the receiver may be limited(缓冲器容量) (2) The longer the transmission, the more likely that there will be an error, necessitating retransmission of the entire frame. With smaller frames. errors are detected sooner and a smaller amount of data needs to be retransmitted.(出错重传) (3)On a shared medium, such as a LAN, it is usually desirable not to permit one station to occupy the medium for an extended period thus causing long delays at the other sending stations.(共享媒体)
11 (1)Stop-and-Wait Flow Control – 工作方式 • 发送方:传一个帧; • 接收方:收到后,发回一个确认,表示愿意接收下一帧; • 发送方:等待,直到收到确认信息; • 若接收方不发确认,则简单中止传输。 – 帧的长度不能太长。A source need to break up a large block of data into smaller blocks and transmit the data in many frames. – 原因: (1) The buffer size of the receiver may be limited(缓冲器容量). (2) The longer the transmission, the more likely that there will be an error, necessitating retransmission of the entire frame. With smaller frames, errors are detected sooner, and a smaller amount of data needs to be retransmitted.(出错重传) (3) On a shared medium, such as a LAN, it is usually desirable not to permit one station to occupy the medium for an extended period, thus causing long delays at the other sending stations.(共享媒体)
Bit Length and Frame Length Bit Length: the bit length of a link is the number of bits present on the link when a stream of bits fully occupies the link即当数据流占满链 路时,给定的链路上能排布多少个bt,可如下计算 Bit length=R*d/v(bit) Where r is the data rate in bps d is the distance of the link in meters V is the velocity of propagation in m/s Frame Length:一帧数据的bt数。 Transmission Time,(传输时间;发送时间): The time it takes for a station to transmit a frame Propagation Time,a(传播时间): The time it takes for a bit to travel from sender to receiver
12 Bit Length and Frame Length • Bit Length: the bit length of a link is the number of bits present on the link when a stream of bits fully occupies the link. 即当数据流占满链 路时,给定的链路上能排布多少个bit,可如下计算: Bit length=R*d/V (bit) Where R is the data rate in bps; d is the distance of the link in meters; V is the velocity of propagation in m/s • Frame Length: 一帧数据的bit数。 • Transmission Time, 1(传输时间;发送时间): The time it takes for a station to transmit a frame. • Propagation Time, a(传播时间): The time it takes for a bit to travel from sender to receiver
The Inefficiency of Stop-and Wait (Figure 7.2) T to E Frame 回 0+1 fo +a blsr oooAto0 mon ene 4发之一修 I-E BIol 一12 o 扌 1 o to+1+a +1+2a fo+ 1+ 2a (a)a>1xcbt3送甲 (b)a<1O半cs ure 7.2 Stop-and-Wait Link Utilization(transmission time= 1; propagation time =a)
13 The Inefficiency of Stop-and Wait (Figure 7.2)
Stop-and-Wai方式的缺点 In the situation where the bit length(a)of the link is greater than the frame length(1)., series inefficiencies result.(参见图7.2,P197) The transmission time(发送时间) is normalized to 1, and the propagation delay(传播时间) is expressed as the variable a When a<l, the propagation time is less than the transmission time Then the frame is sufficiently long that the first bits of the frame have arrived at the destination before the source has completed the transmission of the frame When a>l, the propagation time is greater than the transmission time In this case, the sender completes transmission of the entire frame before the leading bits of that frame arrive at the receiver In Figure7.2,ifa>1, the line is al ways underutilized(没有充分利 用); even if a<1, the line is also inefficiently utilized(利用率也不 E. In essence, for very high data rates, for very long distances between sender and receiver, stop-and-wait flow control provide inefficient line utilization
14 Stop-and-Wait方式的缺点 • In the situation where the bit length (a) of the link is greater than the frame length (1), series inefficiencies result. (参见图7.2,P.197) • The transmission time (发送时间)is normalized to 1, and the propagation delay (传播时间)is expressed as the variable a. • When a<1, the propagation time is less than the transmission time. Then the frame is sufficiently long that the first bits of the frame have arrived at the destination before the source has completed the transmission of the frame. • When a>1, the propagation time is greater than the transmission time. In this case, the sender completes transmission of the entire frame before the leading bits of that frame arrive at the receiver. • In Figure 7.2, if a>1, the line is always underutilized (没有充分利 用); even if a<1, the line is also inefficiently utilized(利用率也不 高). In essence, for very high data rates, for very long distances between sender and receiver, stop-and-wait flow control provide inefficient line utilization
(2) Sliding Window Flow Control 停止等待的缺点 The essence of the problem described so far is that only one frame at a time can be in transit In situations where the bit length of the link is greater than the frame length(a>1), serious inefficiencies result ·解决的思路 Efficiency can be greatly improved by allowing multiple frames to be in transit at the same time 滑动窗方法 假定A,B两个站,A为发送站,B为接收站,全双工方式 A,B站各维护一个长度为W的 buffer(窗口),即A可连续发 W帧,B可连续收W帧,其间可以不应答; B对A发送的多帧数据进行一次应答,而不是每一帧应答一次;
15 (2) Sliding Window Flow Control • 停止等待的缺点 – The essence of the problem described so far is that only one frame at a time can be in transit. In situations where the bit length of the link is greater than the frame length (a>1), serious inefficiencies result. • 解决的思路 – Efficiency can be greatly improved by allowing multiple frames to be in transit at the same time. • 滑动窗方法 – 假定A,B两个站,A为发送站,B为接收站,全双工方式; – A,B站各维护一个长度为W的buffer(窗口),即A可连续发 W帧,B可连续收W帧,其间可以不应答; – B对A发送的多帧数据进行一次应答,而不是每一帧应答一次;