CS 168 · DISCUSSION 02 · GUIDED REASONING WORKBOOK
把所有 delay 写成“哪一段 bytes 在哪条 link 上占了多久”,再判断何时形成 queue;不要靠跨洲/大文件等语言直觉。
无需离开 CourseStack:先预测,再在表格、时间线或状态空间里完成推导;卡住时逐层打开提示,最后才展开解释与变式。
已阅读 Spring 2026 worksheet 与 official solution;以下是原创等价练习。官方 IDs 用于 coverage,对精确原题请回到页末 PDF。
对应官方 1.1、1.2、1.3、1.4、1.5
Why the official problem exists:训练你在 packet、file 与 flow 三个尺度切换时不混淆 propagation、transmission 与 queuing。
跨洲 link:rate=100 Gbit/s,one-way propagation=20 ms。比较 100 MB message 与 100 GB file。
先预测:100 MB 放上链路约 8 ms,端到端首份数据的主导项?
分别计算 L/R,与 20 ms 比较;再解释为什么 bursty 不必然排队,以及 packet switching 如何利用 peak-of-aggregate 小于 sum-of-peaks。
统一 bit、second 单位。
queue state 是 backlog;没有 backlog 就没有 queuing delay。
先算 100 MB×8 / 100 Gbit/s。
100 MB→8 ms,小于 20 ms;100 GB→8 s,transmission 主导。Bursty 只有在到达间隔短于服务时间且已有重叠时才形成 backlog。Internet 按需 packet switching,而非每次先预留 circuit。
主导 delay 是数值比较,不是介质标签。统计复用来自流量峰值通常不同步。
rate 降为 10 Gbit/s,求 propagation 与 transmission 相等时的 message size。
对应官方 2.1、2.2、2.3、2.4
Why the official problem exists:检查你是否按 event time 推 packet,而不是把所有 link delay 一次相加。
A—B 两条 link:R1=10 Mbit/s,prop1=2 ms;B—C:R2=5 Mbit/s,prop2=1 ms。两个 1000-byte packets 背靠背从 A 出发,B store-and-forward。
先预测:第二包在 B 是否排队?
| 事件 | P1 | P2 |
|---|---|---|
| 最后一 bit 到 B | ____ | ____ |
| 开始 B→C | ____ | max(到达, P1完成)=____ |
| 到 C | ____ | ____ |
store-and-forward 要等整个 packet 到齐。
B 的输出 link 是单服务器,next start=max(arrival, previous finish)。
先算 8000/10M=0.8 ms,8000/5M=1.6 ms。
P1 最后一 bit 2.8 ms 到 B,2.8→4.4 ms 发送并于 5.4 ms 到 C。P2 于 3.6 ms 到 B,但等到 4.4 ms 才开始,6.0 ms 发完,7.0 ms 到 C;queue=0.8 ms。无排队条件是上游 packet spacing ≥ 下游 service time。
事件时间线显式保存 output-link busy-until state,因此 max 项自然出现。
把 R2 提高到 20 Mbit/s,重算 busy-until;哪条不等式保证 queue=0?
对应官方 3.1、3.2、3.3
Why the official problem exists:用时间序列证明统计复用,而不是背一句“更有效”。
三条 flow 在三个时隙的 rates:F1=[8,1,1],F2=[1,7,1],F3=[1,1,6] Mbit/s。
先预测:sum of individual peaks 与 aggregate peak 分别是?
先逐 flow 找 peak,再逐 column 求 aggregate=[__,__,__],最后比较两种 peak。
max 与 sum 一般不可交换。
sum(max Fi) 是各流分别最坏;max(sum Fi) 是同一时刻共享容量。
先算每个时隙 8+1+1。
sum of peaks=21 Mbit/s;aggregate 每时隙=10,所以 peak aggregate=10。若各 flow 的峰完全同步,两者才相等。
共享 link 只需承载同一时刻的总量;不同步的 idle capacity 可被别的 flow 使用。
把 F2 改为 [7,1,1]。重新计算并说明同步如何降低 multiplexing gain。
自造两条不同 rate、propagation 的链路和三个 packets,画完整 busy-until timeline;再造三条 flow 使 sum-of-peaks 恰等于 aggregate peak。