Skip to content

Commit

Permalink
vault backup: 2024-09-30 11:21:42
Browse files Browse the repository at this point in the history
  • Loading branch information
zzicarus committed Sep 30, 2024
1 parent 1214f78 commit 04feb09
Show file tree
Hide file tree
Showing 32 changed files with 1,123 additions and 74 deletions.
20 changes: 20 additions & 0 deletions docs/CS/CA/Pipelining.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
tags:
- doing
- class/CA
statistics: true
title: NOTE
author: zzicarus
date: <% tp.date.now("YYYY-MM-DD HH:mm:ss") %>
update: <% tp.date.now("YYYY-MM-DD HH:mm:ss") %>
---
# Pipelining
## Hazard
**Structural Hazard**
- Double bump
- WRITE-then-READ
**Control Hazard**
- 延时槽 branch delay slots
![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409241534052.png)
## FP units
![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409241540466.png)
6 changes: 5 additions & 1 deletion docs/CS/CA/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ Publish: draft
author: zzicarus
---
>[!abstract] 概述
>
>>[!note] 分数构成
>>![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409161011074.png)



>[!note] 个人感受
Expand Down
Empty file added docs/CS/CN/Application Layer.md
Empty file.
28 changes: 0 additions & 28 deletions docs/CS/CN/Ch1_.md

This file was deleted.

Empty file added docs/CS/CN/Data Link Layer.md
Empty file.
109 changes: 109 additions & 0 deletions docs/CS/CN/Overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
tags:
- doing
- CN
statistics: true
title: NOTE
author: zzicarus
date: <% tp.date.now("YYYY-MM-DD HH:mm:ss") %>
update: <% tp.date.now("YYYY-MM-DD HH:mm:ss") %>
---

# Overview
## 实验部分 | 了解一些术语和基本协议
>[!note] Terms
>- ISP(Internet Service Provider)因特网服务提供商。端系统通过 ISP 连接到网络
>- host/end system 主机/端系统
>- message
> - packet 将较长的 message 进行分组后的结果。当一台端系统要向另一台端系统发送数据时,发送端系统将数据分段,并为每段加上首部字节。
>- communication Link 通信链路
>- packet switch 分组交换机
> - router 路由器
> - link-layer switch 链路层交换机
>- socket interface 套接字接口是数据发送端需要遵循的一种规则,这样数据才能正常发送
>-
>[!note] 传输层协议
TCP 面向连接的
UDP
MAC 唯一的,基于网卡的

>[!info] Four Internet Model
>![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409121558575.png)
## 交换方式
`Router` 对收到的 packet 进行存储转发实现分组交换
- 电路交换
有线电话网络。
- 连接建立 —— 数据传送 —— 连接释放
- 缺点:中间节点无法发现并纠正错误;建立连接时间长
- 报文(message)交换 ——使用存储转发技术
将 data 和其他数据封装
- 分组交换 —— 在报文交换的基础上,对较长的 message 进行划分,在头部加上数据段形成新的 packet
- 可以进行流水线化处理

## 计算机网络的分类
## 性能指标
- **Speed**:连接到网络上的节点在数字信道上传送数据的速率,又称之为数据传输速率、比特率,单位 b/s 、bit/s 、bps
- **Bandwidth 带宽**:最高数据传输速率
- **Throughput 吞吐量**:单位时间通过某个网络的实际数据量
- **Delay 时间延迟**: 发送延迟 + 传播延迟 + 处理延迟 + 排队延迟
- 发送时延又称为传输时延,一个分组传输的的时间
- 传播时延是从某个 router 到另一个 router,是两台路由器之间距离的函数
- **时延带宽积** = 传播时延 * 信道带宽,是发送的第一个 bit 到达终点时,发送端发出的 **bit 数**
- **Round-Trip Time | RTT 往返时延**:
-
>[!caution] 注意审题
>看看清楚 bits 还是 byte,1 B = 8 bits
## OSI 模型 & TCP/IP 模型
![image.png](http://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409242000269.png)
### OSI
![image.png](http://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409242003204.png)

- Service
- Interface
- Protocol
**各层级的作用**
- Physical Layer 物理层并不是物理介质,不包括电缆线等这些介质。规定了一些电路接口、信号
- Network Layer
传输单位为 ``。
- Data Link Layer
将来自网络层的 IP 分组封装成 **frame**,可靠地传输到相邻结点的网络层。可以将强物理层传输原始比特流的功能,将物理层可能出错的错误进行修正
> The data link layer operates between two directly connected nodes and does not provide end-to-end communication。



IP Service
**simple service**
- Datagram
- Unreliable
- Best Effort
- Connectionless
**features**
- End-to-end

- 阻止 packets 永远 loop
- TTL
- Fragment packet
- Header to checksum
- 可拓展,增加新的 options 到 header

**IPV4**
![image.png](http://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409241207369.png)

- Version: IPV 4/6
- Total Packer Length :Header and data
- Type Of service: how important
- Packet ID
- Flags
- Fragment Offset
- Protocol ID:说明 data 是哪种类型,将 data 交给相应的 code 进行处理。( == 6 )
- TTL

采用 three-way handshake 方法

**TCP**

Forwarding table
78 changes: 78 additions & 0 deletions docs/CS/CN/Physical Layer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
tags:
- doing
statistics: true
title: NOTE
author: zzicarus
date: <% tp.date.now("YYYY-MM-DD HH:mm:ss") %>
update: <% tp.date.now("YYYY-MM-DD HH:mm:ss") %>
---
# Physical Layer

- 速率
- **码元传输速率/波特率** :单位时间数字通信系统传输的码元数 Baud
- **信息传输速率/比特率 max data rate** : 单位时间内数字通信系统传输的二进制码元数 b/s
- 带宽
- 在模拟信号系统,某个信道传输信号的频率范围 Hz
- 计算机网络,网络的通信线路传输数据的能力——**最高数据率**,b/s
- Maximum Data Rate
- **Nyquist’s theorem** 在理想低通(无噪声、宽带有限)的条件下,避免码间串行
- 极限码元传输速率为 2W Baud (W 为 channel 的频率带宽)
- 极限数据传输速率 = $2Wlog_2V$ (V 为每个码元的离散电平数目——多少种不同的码元)
- **Shannon’s formula** for capacity of **a noisy channel**
- Max data rate = $Wlog_2{(1+\frac{S}{N})}$ S 传输信号的平均功率,N 高斯噪声功率,信噪比 = S/N = $10log_{10}S/N$ dB
>[!note]
>
- 编码:数据 -> 数字信号
- **归零编码 Return to Zero (RZ)**: 每个时钟周期均跳变到低电平(归零)
- **非归零编码 Non-Return to Zero (NRZ)**
- **反向非归零编码 NRZ Insert (NRZI)**:信号翻转代表 1,不翻转代表 0
- **曼彻斯特编码 Manchester**: 将码元分割成两个相等的间隔,下跳表示 1,上跳表示 0. 电平跳变既是时钟信号用于同步,又是数据信号
- 以太网使用
- **差分曼彻斯特编码**:电平跳变仅仅表示时钟信号,码元开始处无跳变为 0 有则为 1
![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409261002264.png)

- 调制:数据 -> 模拟信号 module
- FM 应用广泛
- PM 改变载波的香味来表示 1/0,用相位 $0/pai$ 表示——绝对调相
- QAM 正交幅度调制 :在频率相同的条件下,结合 AM、PM
![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409261020490.png)
- 多路复用 multiplexing
-

## Guided Transmission Media
- Persistent storage
- Twisted pairs 双绞线
- Coaxial cable 同轴电缆
- Power lines
- Fiber optics 光纤
- Essentially infinite bandwidth
-

## Wireless

## From Waveforms to bits
- 傅里叶变换
![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409251023470.png)

- Bandwidth-limited signals
![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409260926012.png)
## Multiplexing
### Frequency Division Multiplexing
![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409261034571.png)
- 同时不同频
### Time Division Multiplexing
![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409261034127.png)
- 按时间分时
### Code Division Multiplexing
- 码分,更加灵活可以灵活调整带宽的分配
- 同频又同时,同时发出但存在规律可以反解码
![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409261044456.png)
- 0 silence,-1 发送 0,1 发送 1
### Wavelength Division Multiplexing
- 不同光的频率不同,本质上是频分
![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409261046301.png)
## 设备 | 中继器
![image.png](https://zzh-pic-for-self.oss-cn-hangzhou.aliyuncs.com/img/202409261055974.png)
- 上面的方式 A/D 转换次数多,信噪比低,传输速率低
- Trunk
Empty file added docs/CS/CN/Transport Layer.md
Empty file.
7 changes: 7 additions & 0 deletions docs/CS/CN/cs144.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Packet Switching
只需要考虑高速传递信息
**Flow**
同一端到端的 datagrams 的集合
- Statical Multiplexing
- 允许 flows 使用所有的 link capacity
- 允许 flows share link capacity
2 changes: 1 addition & 1 deletion docs/CS/CN/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ author: zzicarus
>[!todo] Todo
>- [ ] todolist
- [[../CA/Ch1|Overview]]
- [[../CA/Pipelining|Overview]]
- [[Network Layer]]
-
5 changes: 5 additions & 0 deletions docs/CS/CN/题目.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 题目
## Overview
**Q 1.** A collection of five routers is to be connected in a point-to-point subnet. Between each pair of routers, the designers may put a high-speed line, a medium-speed line, a low-speed line, or no line. If it takes 100 ms of computer time to generate and inspect each topology, how long will it take to inspect all of them? (give your answer as xxx.xx)

> $C_{5}^{2}=10$ 种拓朴链接方式,每一种都有四种连线方式,共计 $4^{10}$ 种选择方式,104857.60 sec
Loading

0 comments on commit 04feb09

Please sign in to comment.