传播时延(propagation delay)与发送时延(transmission delay)

本文详细解释了传播时延和发送时延的概念,并区分了它们与带宽的关系。传播时延指信号在介质中的传输时间,与数据大小无关;发送时延则是数据从结点进入传输媒体所需的时间。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

原文:

http://wzw19191.blog.sohu.com/135110823.html

传播时延这个概念,是指电磁信号或者光信号在传输介质中传输的时延,而在光纤或者铜线中,光信号和电磁信号的传播速度都在20万公里/秒以上,在传输介质中传输的是电磁信号或者光信号,而不是数据!

发送时延是指结点在发送数据时使数据块从结点进入到传输媒体所需的时间,也就是从数据块的第一个比特开始发送算起,到最后一个比特发送完毕所需的时间。发送时延又称为传输时延

而带宽,也称媒体接入速率,即数据从结点进入到媒体的速率。

传播时延和要发送的数据大小没有关系,发送数据的大小只与发送时延有关,因为发送时延=数据/带宽,而传播时延=发送距离/传播速率,在光纤,双绞线,电缆等传输媒体中,传播速率是固定的,因此,传播时延主要是与传输距离有关!而与发送的数据大小无关!

-------------------------------------------------------------------------

http://answers.yahoo.com/question/index?qid=20090218195707AA8qyoK

transmission delay

In a network based on packet switching, transmission delay (or store-and-forward delay) is the amount of time required to push all of the packet's bits into the wire. In other words, this is the delay caused by the data-rate of the link.

Transmission delay is a function of the packet's length and has nothing to do with the distance between the two nodes. This delay is proportional to the packet's length in bits,

It is given by the following formula:

DT = N / R 
where

DT is the transmission delay 
N is the number of bits, and 
R is the rate of transmission (say in bits per second) 
Most packet switched networks use store-and-forward transmission at the input of the link. A switch using store-and-forward transmission will receive (save) the entire packet to the buffer and check it for CRC errors or other problems before sending the first bit of the packet into the outbound link. Thus store-and-forward packet switches introduce a store-and-forward delay at the input to each link along the packet's route.

http://www.answers.com/transmission%20de…

propagation delay

The time required for a signal to pass through a given complete operating circuit; it is generally of the order of nanoseconds, and is of extreme importance in computer circuits. 

The time it takes to transmit a signal from one place to another. Propagation delay is dependent solely on distance and two thirds the speed of light. Signals going through a wire or fiber generally travel at two thirds the speed of light. 

Networking
Propagation delay is defined as the amount of time it takes for a certain number of bytes to be transferred over a medium. Propagation delay is the distance between the two routers divided by the propagation speed.

Propagation delay = d/s where d is the distance and s is the speed.

In electronics, digital circuits and digital electronics, the propagation delay, or gate delay, is the length of time starting from when the input to a logic gate becomes stable and valid, to the time that the output of that logic gate is stable and valid. Often this refers to the time required for the output to reach 50% of its final output level when the input changes. Reducing gate delays in digital circuits allows them to process data at a faster rate and improve overall performance.

The difference in propagation delays of logic elements is the major contributor to glitches in asynchronous circuits as a result of race conditions.

The principle of logical effort utilizes propagation delays to compare designs implementing the same logical statement.

(more......)

#include <math.h> #include<stdio.h> float light_speed=2pow(10,5);//光信号在光纤中的传播速率(km/s) float r_delay=1;//交换设备转发时延(ms),包括处理时延+排队时延 /************************************************ 计算传播时延; router_num为A->B经过的交换设备数量, spacing表示结点等间距(Km); 返回:传播延时(ms). *************************************************/ float propagation_delay(int router_num,int spacing){ float p_delay=0; /********Begin 1 ***********/ /*********End 1 **********/ return p_delay; } /************************************************* 计算单个分组的发送时延; packet_len为分组长度(byte), send_rate接口发送速率(bit/s); 返回:发送延时(ms). *************************************************/ float transmission_delay(int packet_len,int send_rate){ float t_delay=0; /********Begin 2 ***********/ /*********End 2 **********/ return t_delay; } /************************************************* 计算发送一个分组并收到确认的延时,忽略确认分组的发送时延; packet_len为分组长度(byte), send_rate接口发送速率(bit/s); router_num为A->B经过的交换设备数量, spacing表示结点等间距(Km); 返回:单分组的往返延时(ms). *************************************************/ float network_delay(int packet_len,int send_rate,int router_num,int spacing){ float n_delay=0; /********Begin 3 ***********/ /*********End 3 **********/ return n_delay; } /************************************************* 计算发送一个文件并收到确认的延时,忽略确认分组的发送时延, 采用停等协议,每发一个分组,待确认后发下一个分组; file_len文件长度(byte) packet_len为分组最大长度(byte), send_rate接口发送速率(bit/s); router_num为A->B经过的交换设备数量, spacing表示结点等间距(Km); 返回:文件全部发送并收到确认的时延(ms). *************************************************/ float network_delay_stop_wait(int file_len,int packet_len,int send_rate,int router_num,int spacing){ float n_delay=0; /********Begin 4 ***********/ //确定需要的分组数量 //分组等长 //余下字节构建一个不足长的分组 /*********End 4 **********/ return n_delay; } /************************************************* 计算发送一个文件并收到确认的延时,忽略确认分组的发送时延, 采用滑动窗口协议,可以连续发送分组,不限制连续发送的分组数量, 可以看出分组后,各结点占发送时延可以重叠,不用等全部文件发送后才开发转发; file_len文件长度(byte), packet_len为分组最大长度(byte), send_rate接口发送速率(bit/s); router_num为A->B经过的交换设备数量, spacing表示结点等间距(Km); 返回:文件全部发送并收到确认的时延(ms). *************************************************/ float network_delay_sliding_window(int file_len,int packet_len,int send_rate,int router_num,int spacing){ float n_delay=0; /********Begin 5 ***********/ //确定需要的分组数量 //如果分组等长,则整个时延是一个分组的时延+(所有分组-最后一个分组的)的发送时延 //不等长,意味着最后一个分组短于其他分组。实际分组为packet_num+1 /*********End 5 **********/ return n_delay; } /************************************************* 计算发送一个文件并收到确认的延时,忽略确认分组的发送时延, 采用滑动窗口协议,可以连续发送分组,但限制连续发送的分组数量; file_len文件长度(byte), max_window_num连续发送的最大分组数量, packet_len为分组最大长度(byte), send_rate接口发送速率(bit/s); router_num为A->B经过的交换设备数量, spacing表示结点等间距(Km); 返回:文件全部发送并收到确认的时延(ms). *************************************************/ float network_delay_sliding_window(int max_window_num,int file_len,int packet_len, int send_rate,int router_num,int spacing){ float n_delay=0; /********Begin 6 ***********/ //第一个分组确认的时延窗口发送时间的差值 //如果在窗口内发送时长内收到第一个确认,则表示可以连续发送分组 //如果发送窗口内收不到确认则会多出窗口间的等待确认延时 /*********End 6 **********/ return n_delay; }测试输入: max_wnd_num:1 ,file_len:10900, pkt_len: 1000,send_rate:2000000, rt_num:9,spacing:100 —— 预期输出 —— max_wnd_num:1 ,file_len:10900, pkt_len: 1000, send_rate:2000000, rt_num:9,spacing:100 propagation_delay: 5.000 transmission_delay: 4.000 network_delay: 68.000 network_stop_wait: 744.000 sliding_window1: 107.600 sliding_window2: 744.000
最新发布
05-31
#include <math.h> #include<stdio.h> float light_speed=2*pow(10,5);//光信号在光纤中的传播速率(km/s) float r_delay=1;//交换设备转发时延(ms),包括处理时延+排队时延 /************************************************* 计算传播时延; router_num为A->B经过的交换设备数量, spacing表示结点等间距(Km); 返回:传播延时(ms). *************************************************/ float propagation_delay(int router_num,int spacing){ float p_delay=0; /********Begin 1 ***********/ /*********End 1 **********/ return p_delay; } /************************************************* 计算单个分组的发送时延; packet_len为分组长度(byte), send_rate接口发送速率(bit/s); 返回:发送延时(ms). *************************************************/ float transmission_delay(int packet_len,int send_rate){ float t_delay=0; /********Begin 2 ***********/ /*********End 2 **********/ return t_delay; } /************************************************* 计算发送一个分组并收到确认的延时,忽略确认分组的发送时延; packet_len为分组长度(byte), send_rate接口发送速率(bit/s); router_num为A->B经过的交换设备数量, spacing表示结点等间距(Km); 返回:单分组的往返延时(ms). *************************************************/ float network_delay(int packet_len,int send_rate,int router_num,int spacing){ float n_delay=0; /********Begin 3 ***********/ /*********End 3 **********/ return n_delay; } /************************************************* 计算发送一个文件并收到确认的延时,忽略确认分组的发送时延, 采用停等协议,每发一个分组,待确认后发下一个分组; file_len文件长度(byte) packet_len为分组最大长度(byte), send_rate接口发送速率(bit/s); router_num为A->B经过的交换设备数量, spacing表示结点等间距(Km); 返回:文件全部发送并收到确认的时延(ms). *************************************************/ float network_delay_stop_wait(int file_len,int packet_len,int send_rate,int router_num,int spacing){ float n_delay=0; /********Begin 4 ***********/ //确定需要的分组数量 //分组等长 //余下字节构建一个不足长的分组 /*********End 4 **********/ return n_delay; } /************************************************* 计算发送一个文件并收到确认的延时,忽略确认分组的发送时延, 采用滑动窗口协议,可以连续发送分组,不限制连续发送的分组数量, 可以看出分组后,各结点占发送时延可以重叠,不用等全部文件发送后才开发转发; file_len文件长度(byte), packet_len为分组最大长度(byte), send_rate接口发送速率(bit/s); router_num为A->B经过的交换设备数量, spacing表示结点等间距(Km); 返回:文件全部发送并收到确认的时延(ms). *************************************************/ float network_delay_sliding_window(int file_len,int packet_len,int send_rate,int router_num,int spacing){ float n_delay=0; /********Begin 5 ***********/ //确定需要的分组数量 //如果分组等长,则整个时延是一个分组的时延+(所有分组-最后一个分组的)的发送时延 //不等长,意味着最后一个分组短于其他分组。实际分组为packet_num+1 /*********End 5 **********/ return n_delay; } /************************************************* 计算发送一个文件并收到确认的延时,忽略确认分组的发送时延, 采用滑动窗口协议,可以连续发送分组,但限制连续发送的分组数量; file_len文件长度(byte), max_window_num连续发送的最大分组数量, packet_len为分组最大长度(byte), send_rate接口发送速率(bit/s); router_num为A->B经过的交换设备数量, spacing表示结点等间距(Km); 返回:文件全部发送并收到确认的时延(ms). *************************************************/ float network_delay_sliding_window(int max_window_num,int file_len,int packet_len, \ int send_rate,int router_num,int spacing){ float n_delay=0; /********Begin 6 ***********/ //第一个分组确认的时延窗口发送时间的差值 //如果在窗口内发送时长内收到第一个确认,则表示可以连续发送分组 //如果发送窗口内收不到确认则会多出窗口间的等待确认延时 /*********End 6 **********/ return n_delay; }
05-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值