询问/应答方式的流程图 A站 B站 ENQ=Enquiry ACQ ACQ=Acknowledge 数据 数据 传输结束 时间
6 询问/应答方式的流程图 ENQ ENQ=Enquiry ACQ ACQ=Acknowledge 数据 应答 数据 应答 传输结束 时间 时间 A站 B站
轮询/选择模式 这种模式用于多点设备结构,但其中某一个为主设备,其余的 为从设备 主设备:控制链路,总是会话的发起者; 从设备:遵从住设备的指令; 工作方式: 1)选择方式一主设备有数据发送,告知从设备准备好接收 (2)轮询方式—主设备希望接收数据,询问从设备有无数据待发。 A B 主设备 地址: 链路上每个设备有自己的名字或地址; 每次传输,数据帧中会建立地址部分(称为地址域或称为报 头)
7 2. 轮询/选择模式 - 这种模式用于多点设备结构,但其中某一个为主设备,其余的 为从设备。 - 主设备:控制链路,总是会话的发起者; - 从设备:遵从住设备的指令; - 工作方式: (1)选择方式—主设备有数据发送,告知从设备准备好接收; (2)轮询方式—主设备希望接收数据,询问从设备有无数据待发。 - 地址: · 链路上每个设备有自己的名字或地址; · 每次传输,数据帧中会建立地址部分(称为地址域或称为报 头) A B C 主设备
(1)选择模式 主设备有数据要发送时: 通知从设备准备好接收; 等待从设备的回答 发送数据之前,主设备产生 个选择祯(SEL),其中包 B 含一个地址域,填入要发送的 主设备 从设备的地址; 数据沿着链路发送时,任 何一个从设备均有可能接收到 此数据。各个从设备都校验数 据中的地址域 数据 若与自己的一致,则读入 应答 若不一致,则放弃 时间 时间 选择C
8 ( 1 ) 选择模式 当主设备有数据要发送时: - 通知从设备准备好接收; - 等待从设备的回答; - 发送数据之前,主设备产生 一个选择祯(SEL),其中包 含一个地址域,填入要发送的 从设备的地址; - 当数据沿着链路发送时,任 何一个从设备均有可能接收到 此数据。各个从设备都校验数 据中的地址域; - 若与自己的一致,则读入; - 若不一致,则放弃 A B C 主设备 SEL ACK 数据 应答 时间 时间 选择C
(2)轮询模式 主设备请求从设备发送数据。 B 主设备 轮询 否定应答 ENQ 数据 应答帧 ENQ 否定应答 时间 时间
9 (2) 轮询模式 主设备请求从设备发送数据。 A B C 主设备 时间 时间 轮询 否定应答 ENQ 数据 应答帧 ENQ 否定应答
§7-2流量控制 为什么要进行流量控制 Flow control is a technique for assuring that a transmitting entity does not overwhelm a receiving entity with data. The receiving entity typically allocates a data buffer of some maximum length for a transfer When data are received. the receiver must do a certain amount of processing before passing the data to the higher level software. In the absence of flow control, the receiver's buffer may fill up and overflow while it is processing old data ·流量控制的方法 (1)停止等待流量控制(Stop-and- Wait Flow Control) (2)滑动窗流量控制( Sliding Window Flow Control)
10 §7-2 流量控制 • 为什么要进行流量控制 – Flow control is a technique for assuring that a transmitting entity does not overwhelm a receiving entity with data. The receiving entity typically allocates a data buffer of some maximum length for a transfer. When data are received, the receiver must do a certain amount of processing before passing the data to the higher level software. In the absence of flow control, the receiver’s buffer may fill up and overflow while it is processing old data. • 流量控制的方法 (1)停止等待流量控制(Stop-and-Wait Flow Control) (2)滑动窗流量控制(Sliding Window Flow Control)