From 445ae4a71eea39c9ad7902b981e9a41d2f71f632 Mon Sep 17 00:00:00 2001 From: hanyujie2002 Date: Thu, 2 May 2024 17:08:42 +0800 Subject: [PATCH] Localize the images in lecture intro with drawio (#65) --- img/lectures/Asymmetric_multiProcessing.dio | 76 +++++ img/lectures/Asymmetric_multiProcessing.svg | 1 + img/lectures/Block_IO_management.dio | 58 ++++ img/lectures/Block_IO_management.svg | 3 + img/lectures/Linux_kernel_architecture.dio | 127 ++++++++ img/lectures/Linux_kernel_architecture.svg | 1 + img/lectures/Micro_kernel.dio | 95 ++++++ img/lectures/Micro_kernel.svg | 4 + img/lectures/Monolithic_kernel.drawio | 148 +++++++++ img/lectures/Monolithic_kernel.svg | 3 + img/lectures/Networking_stack.dio | 52 +++ img/lectures/Networking_stack.svg | 2 + img/lectures/Symmetric_MultiProcessing.dio | 82 +++++ img/lectures/Symmetric_MultiProcessing.svg | 1 + ...pical_operating_system_architecture.drawio | 97 ++++++ .../Typical_operating_system_architecture.svg | 1 + ...rnel_sharing_the_virtual_address_space.dio | 46 +++ ...rnel_sharing_the_virtual_address_space.svg | 1 + img/lectures/Virtual_Filesystem_Switch.dio | 97 ++++++ img/lectures/Virtual_Filesystem_Switch.svg | 3 + lectures/intro.rst | 297 +----------------- 21 files changed, 911 insertions(+), 284 deletions(-) create mode 100644 img/lectures/Asymmetric_multiProcessing.dio create mode 100644 img/lectures/Asymmetric_multiProcessing.svg create mode 100644 img/lectures/Block_IO_management.dio create mode 100644 img/lectures/Block_IO_management.svg create mode 100644 img/lectures/Linux_kernel_architecture.dio create mode 100644 img/lectures/Linux_kernel_architecture.svg create mode 100644 img/lectures/Micro_kernel.dio create mode 100644 img/lectures/Micro_kernel.svg create mode 100644 img/lectures/Monolithic_kernel.drawio create mode 100644 img/lectures/Monolithic_kernel.svg create mode 100644 img/lectures/Networking_stack.dio create mode 100644 img/lectures/Networking_stack.svg create mode 100644 img/lectures/Symmetric_MultiProcessing.dio create mode 100644 img/lectures/Symmetric_MultiProcessing.svg create mode 100644 img/lectures/Typical_operating_system_architecture.drawio create mode 100644 img/lectures/Typical_operating_system_architecture.svg create mode 100644 img/lectures/User_and_kernel_sharing_the_virtual_address_space.dio create mode 100644 img/lectures/User_and_kernel_sharing_the_virtual_address_space.svg create mode 100644 img/lectures/Virtual_Filesystem_Switch.dio create mode 100644 img/lectures/Virtual_Filesystem_Switch.svg diff --git a/img/lectures/Asymmetric_multiProcessing.dio b/img/lectures/Asymmetric_multiProcessing.dio new file mode 100644 index 0000000..e45bbec --- /dev/null +++ b/img/lectures/Asymmetric_multiProcessing.dio @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/lectures/Asymmetric_multiProcessing.svg b/img/lectures/Asymmetric_multiProcessing.svg new file mode 100644 index 0000000..2dbb751 --- /dev/null +++ b/img/lectures/Asymmetric_multiProcessing.svg @@ -0,0 +1 @@ +
内存
内存
处理器 A
处理器 A
内核
内核
处理器 B
处理器 B
进程 1
进程 1
进程 2
进程 2
进程 3
进程 3
处理器 C
处理器 C
进程 1
进程 1
进程 2
进程 2
进程 3
进程 3
Text is not SVG - cannot display
\ No newline at end of file diff --git a/img/lectures/Block_IO_management.dio b/img/lectures/Block_IO_management.dio new file mode 100644 index 0000000..4927449 --- /dev/null +++ b/img/lectures/Block_IO_management.dio @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/lectures/Block_IO_management.svg b/img/lectures/Block_IO_management.svg new file mode 100644 index 0000000..7ac536b --- /dev/null +++ b/img/lectures/Block_IO_management.svg @@ -0,0 +1,3 @@ +
虚拟文件系统
虚拟文件系统
设备映射器
设备映射器
通用块层
通用块层
I/O 调度程序
I/O 调度程序
块设备
驱动程序
块设备 +驱动程序
块设备
驱动程序
块设备 +驱动程序
Text is not SVG - cannot display
\ No newline at end of file diff --git a/img/lectures/Linux_kernel_architecture.dio b/img/lectures/Linux_kernel_architecture.dio new file mode 100644 index 0000000..2912db6 --- /dev/null +++ b/img/lectures/Linux_kernel_architecture.dio @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/lectures/Linux_kernel_architecture.svg b/img/lectures/Linux_kernel_architecture.svg new file mode 100644 index 0000000..86ab4ad --- /dev/null +++ b/img/lectures/Linux_kernel_architecture.svg @@ -0,0 +1 @@ +
应用程序 1
应用程序 1
应用程序 2
应用程序 2
应用程序 n
应用程序 n
进程管理
进程管理
内存管理
内存管理
内核
内核
块设备 I/O
块设备 I/O
VFS
VFS
网络
网络
IPC
IPC
Security
Security
Crypto
Crypto
DRM
DRM
ALSA
ALSA
USB
USB
设备驱动
设备驱动
字符
字符
以太网
以太网
wifi
wifi
文件系统
文件系统
输入
输入
iio
iio
usb
usb
framebuffer
framebuffer
平台
平台
drm
drm
架构
架构
机器 1
机器 1
机器 2
机器 2
Text is not SVG - cannot display
\ No newline at end of file diff --git a/img/lectures/Micro_kernel.dio b/img/lectures/Micro_kernel.dio new file mode 100644 index 0000000..8f503cf --- /dev/null +++ b/img/lectures/Micro_kernel.dio @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/lectures/Micro_kernel.svg b/img/lectures/Micro_kernel.svg new file mode 100644 index 0000000..e66d255 --- /dev/null +++ b/img/lectures/Micro_kernel.svg @@ -0,0 +1,4 @@ +
请求
请求
应用
应用
文件
服务器
文件 +服务器
网络
服务器
网络 +服务器
显示
服务器
显示 +服务器
微内核
(进程间通信(IPC)、内存、
调度程序)
微内核(进程间通信(IPC)、内存、...
硬件
硬件
用户
用户
内核
内核
回复
回复
Text is not SVG - cannot display
\ No newline at end of file diff --git a/img/lectures/Monolithic_kernel.drawio b/img/lectures/Monolithic_kernel.drawio new file mode 100644 index 0000000..fea02fc --- /dev/null +++ b/img/lectures/Monolithic_kernel.drawio @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/lectures/Monolithic_kernel.svg b/img/lectures/Monolithic_kernel.svg new file mode 100644 index 0000000..2f7f9e9 --- /dev/null +++ b/img/lectures/Monolithic_kernel.svg @@ -0,0 +1,3 @@ +
应用
应用
应用
应用
应用
应用
系统调用接口
系统调用接口
用户
用户
内核
内核
内核
函数
内核 +函数
设备
驱动
设备 +驱动
硬件
硬件
Text is not SVG - cannot display
\ No newline at end of file diff --git a/img/lectures/Networking_stack.dio b/img/lectures/Networking_stack.dio new file mode 100644 index 0000000..22260c1 --- /dev/null +++ b/img/lectures/Networking_stack.dio @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/lectures/Networking_stack.svg b/img/lectures/Networking_stack.svg new file mode 100644 index 0000000..1f6a2ae --- /dev/null +++ b/img/lectures/Networking_stack.svg @@ -0,0 +1,2 @@ +
伯克利套接字(Socket)接口
伯克利套接字(Socket)接口
传输层
传输层
TCP
TCP
UDP
UDP
网络层
网络层
IP
IP
路由
路由
NetFilter
NetFilter
数据链路层
数据链路层
以太网
以太网
ARP
ARP
桥接
桥接
排队规则
(queuing discipline,qdisk)
排队规则 +(queuing discipline,qdisk)
网络设备驱动程序
网络设备驱动程序
Text is not SVG - cannot display
\ No newline at end of file diff --git a/img/lectures/Symmetric_MultiProcessing.dio b/img/lectures/Symmetric_MultiProcessing.dio new file mode 100644 index 0000000..cb88e05 --- /dev/null +++ b/img/lectures/Symmetric_MultiProcessing.dio @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/lectures/Symmetric_MultiProcessing.svg b/img/lectures/Symmetric_MultiProcessing.svg new file mode 100644 index 0000000..ce9e9ae --- /dev/null +++ b/img/lectures/Symmetric_MultiProcessing.svg @@ -0,0 +1 @@ +
内存
内存
处理器 A
处理器 A
处理器 B
处理器 B
进程 1
进程 1
进程 2
进程 2
内核
内核
处理器 C
处理器 C
进程 1
进程 1
进程 2
进程 2
内核
内核
进程 1
进程 1
进程 2
进程 2
内核
内核
Text is not SVG - cannot display
\ No newline at end of file diff --git a/img/lectures/Typical_operating_system_architecture.drawio b/img/lectures/Typical_operating_system_architecture.drawio new file mode 100644 index 0000000..a5f4bcc --- /dev/null +++ b/img/lectures/Typical_operating_system_architecture.drawio @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/lectures/Typical_operating_system_architecture.svg b/img/lectures/Typical_operating_system_architecture.svg new file mode 100644 index 0000000..3aadf61 --- /dev/null +++ b/img/lectures/Typical_operating_system_architecture.svg @@ -0,0 +1 @@ +应用程序 1应用程序 2应用程序  n系统调用接口内核设备驱动用户空间内核空间硬件 \ No newline at end of file diff --git a/img/lectures/User_and_kernel_sharing_the_virtual_address_space.dio b/img/lectures/User_and_kernel_sharing_the_virtual_address_space.dio new file mode 100644 index 0000000..642f8cb --- /dev/null +++ b/img/lectures/User_and_kernel_sharing_the_virtual_address_space.dio @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/lectures/User_and_kernel_sharing_the_virtual_address_space.svg b/img/lectures/User_and_kernel_sharing_the_virtual_address_space.svg new file mode 100644 index 0000000..118589e --- /dev/null +++ b/img/lectures/User_and_kernel_sharing_the_virtual_address_space.svg @@ -0,0 +1 @@ +
0x00000000
0x00000000
0xC0000000
0xC0000000
0xFFFFFFF
0xFFFFFFF
内核空间
内核空间
用户空间
用户空间
32 位虚拟地址空间
32 位虚拟地址空间
Text is not SVG - cannot display
\ No newline at end of file diff --git a/img/lectures/Virtual_Filesystem_Switch.dio b/img/lectures/Virtual_Filesystem_Switch.dio new file mode 100644 index 0000000..ba141d6 --- /dev/null +++ b/img/lectures/Virtual_Filesystem_Switch.dio @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/lectures/Virtual_Filesystem_Switch.svg b/img/lectures/Virtual_Filesystem_Switch.svg new file mode 100644 index 0000000..edb9462 --- /dev/null +++ b/img/lectures/Virtual_Filesystem_Switch.svg @@ -0,0 +1,3 @@ +
虚拟文件系统
虚拟文件系统
FILE
FILE
dentry
dentry
inode
inode
page
cache
page...
dentry
cache
dentry...
inode
cache
inode...
stat
stat
open
open
read
read
文件系统
驱动
文件系统 +驱动
文件系统
驱动
文件系统 +驱动
Text is not SVG - cannot display
\ No newline at end of file diff --git a/lectures/intro.rst b/lectures/intro.rst index 5fc55d9..8bd3cf7 100644 --- a/lectures/intro.rst +++ b/lectures/intro.rst @@ -65,27 +65,7 @@ :level: 2 :inline-contents: True - .. code-block:: text - - +---------------+ +--------------+ +---------------+ -\ - | 应用程序 1 | | 应用程序 2 | ... | 应用程序 n | | - +---------------+ +--------------+ +---------------+ |> 用户空间 - | | | | - v v v -/ - +--------------------------------------------------------+ -\ - | 系统调用接口 | | - +--------------------------------------------------------+ | - | | | | - v v v |> 内核空间 - +--------------------------------------------------------+ | - | 内核 | | - +--------------------------------------------------------+ | - | 设备驱动 | | - +--------------------------------------------------------+ -/ - | | | -\ - v v v |> 硬件 - -/ - + .. image:: ../img/lectures/Typical_operating_system_architecture.svg 操作系统内核提供了一组 API 供应用程序调用,通常它们称为“系统调用”。这些 API 与普通的库 API 有所不同,它们标志着执行模式从用户态切换到内核态的界限。 @@ -105,39 +85,7 @@ :level: 2 :inline-contents: True - .. code-block:: text - - +-----+ +-----+ +-----+ - | 应用 | | 应用 | | 应用 | - +-----+ +-----+ +-----+ - | | | 用户 - =--|-------=--------|--------=-------|-------------------=- - | | | 内核 - v v v - +--------------------------------------------------------+ - | 系统调用接口 | - +--------------------------------------------------------+ - | | - v v - +-----+ +-----+ - | |<---------------------------->| | 内核 - | |<---+ +------->| | 函数 - +--+--+ | | +-----+ - | | | ^ - | | +-----+ | | - |+------+---->| |<---+ | - || | +-----+ | - || | | - vv | v - +--++-+ | +-----+ - | | +------------------------>| | 设备 - | |<---------------------------->| | 驱动 - +--+--+ +--+--+ - | | - v v - +--------------------------------------------------------+ - | 硬件 | - +--------------------------------------------------------+ + .. image:: ../img/lectures/Monolithic_kernel.svg 尽管如此,大部分单体内核在子系统间都实现了逻辑上的分隔,尤其是核心内核与设备驱动程序之间,它们通常需要通过较为严格的 API 来互相访问服务(这些 API 并非总是固定不变的)。显然,这种做法依赖于内核的具体实现和架构设计。 @@ -148,30 +96,7 @@ 微内核是一种内核设计,其中大部分功能以受保护的方式相互作用,并通常作为用户空间中的服务来运行。因为内核的关键功能现在在用户模式下运行,导致在内核模式下运行的代码量大幅减少,微内核由此得名。 - .. code-block:: text - - +-----+ +--------+ +---------+ +---------+ - | 应用 | | 文件 | | 网络 | | 显示 |<--+ - | 服务 | | 服务器 | | 服务器 | | 服务器 |-+ | - +-----+ +--------+ +---------+ +---------+ | | - | ^ | | 用户 - -|-|----------------------------------------=-|-|-------=- - | | | | 内核 - | | | | - | | | | - | | | | - | | 回复 +----------------------------+ | | - | +--------| |----+ | - +--------->| 微内核 |------+ - 请求 | (进程间通信(IPC),内存, | - | 调度程序) | - +----------------------------+ - | - v - +--------------------------------------------------------+ - | 硬件 | - +--------------------------------------------------------+ - + .. image:: ../img/lectures/Micro_kernel.svg 在微内核架构中,内核只包含最基本代码(允许不同运行进程间进行消息传递)。在实际应用中,这意味着内核仅实现调度程序和进程间通信(IPC)机制,以及基础内存管理,从而在应用程序和服务之间建立了保护层。 @@ -258,25 +183,8 @@ :level: 2 :inline-contents: True - .. code-block:: text - - +-------------------+ ^ - 0xFFFFFFFF | | | - | | | 内核空间 - | | | - +-------------------+ v - 0xC0000000 | | ^ - | | | 用户空间 - | | | - | | | - | | | - | | | - | | | - | | | - | | | - 0x00000000 +-------------------+ v - - 32 位虚拟地址空间 + .. image:: ../img/lectures/User_and_kernel_sharing_the_virtual_address_space.svg + 执行上下文 ------------------ @@ -394,32 +302,7 @@ :level: 2 :inline-contents: True - .. code-block:: text - - +-----------+ - | | - +------------------>| 内存 |<-----------------+ - | | | | - | +-----------+ | - | ^ | - | | | - v v v - +--------------+ +---------------+ +---------------+ - | | | | | | - | 处理器 A | | 处理器 B | | 处理器 C | - | | | | | | - | | | +-----------+ | | +-----------+ | - | | | | 进程 1 | | | | 进程 1 | | - | | | +-----------+ | | +-----------+ | - | | | | | | - | +----------+ | | +-----------+ | | +-----------+ | - | | 内核 | | | | 进程 2 | | | | 进程 2 | | - | +----------+ | | +-----------+ | | +-----------+ | - | | | | | | - | | | +-----------+ | | +-----------+ | - | | | | 进程 3 | | | | 进程 3 | | - | | | +-----------+ | | +-----------+ | - +--------------+ +---------------+ +---------------+ + .. image:: ../img/lectures/Asymmetric_multiProcessing.svg 对称多处理(SMP) @@ -433,32 +316,7 @@ :level: 2 :inline-contents: True - .. code-block:: text - - +-----------+ - | | - +------------------->| 内存 |<------------------+ - | | | | - | +-----------+ | - | ^ | - | | | - v v v - +---------------+ +---------------+ +---------------+ - | | | | | | - | 处理器 A | | 处理器 B | | 处理器 C | - | | | | | | - | +-----------+ | | +-----------+ | | +-----------+ | - | | 进程 1 | | | | 进程 1 | | | | 进程 1 | | - | +-----------+ | | +-----------+ | | +-----------+ | - | | | | | | - | +-----------+ | | +-----------+ | | +-----------+ | - | | 进程 2 | | | | 进程 2 | | | | 进程 2 | | - | +-----------+ | | +-----------+ | | +-----------+ | - | | | | | | - | +-----------+ | | +-----------+ | | +-----------+ | - | | 内核 | | | | 内核 | | | | 内核 | | - | +-----------+ | | +-----------+ | | +-----------+ | - +---------------+ +---------------+ +---------------+ + .. image:: ../img/lectures/Symmetric_MultiProcessing.svg CPU 可扩展性 @@ -484,7 +342,7 @@ Linux 内核概述 Linux 开发模型 ----------------------- -.. slide:: Linux开发模型 +.. slide:: Linux 开发模型 :level: 2 * 开源,采用 GPLv2 许可证 @@ -629,51 +487,7 @@ Linux 内核结构 :level: 2 :inline-contents: True - .. code-block:: text - - +---------------+ +--------------+ +---------------+ - | 应用程序 1 | | 应用程序 2 | ... | 应用程序 n | - +---------------+ +--------------+ +---------------+ - | | | - v v v - +--------------------------------------------------------+ - | 内核 | - | | - | +----------------------+ +-------------------+ | - | | 进程管理 | | 内存管理 | | - | +----------------------+ +-------------------+ | - | | - | +------------+ +------------+ +------------+ | - | | Block I/O | | VFS | | Networking | | - | +------------+ +------------+ +------------+ | - | | - | +------------+ +------------+ +------------+ | - | | IPC | | Security | | Crypto | | - | +------------+ +------------+ +------------+ | - | | - | +------------+ +------------+ +------------+ | - | | DRM | | ALSA | | USB | | - | +------------+ +------------+ +------------+ | - | ... | - +--------------------------------------+-----------------+ - | 设备驱动程序 | arch | - | | | - | +----+ +-----+ +--------+ +----+ | +----------+ | - | |字符 | |块设备 | |以太网 | |wifi | | | 机器 1 | | - | +----+ +-----+ +--------+ +----+ | +----------+ | - | +--------+ +-----+ +----+ +---+ | +----------+ | - | |文件系统| |输入设备| |IIO | |USB | | | 机器 2 | | - | +--------+ +-----+ +----+ +---+ | +----------+ | - | +-----------+ +----------+ +---+ | | - | |帧缓冲区 | |平台设备 | |DRM | | ... | - | +-----------+ +----------+ +---+ | | - +-------------------------+----+-------+-----------------+ - | | | - v v v - - +--------------------------------------------------------+ - | 硬件 | - +--------------------------------------------------------+ + .. image:: ../img/lectures/Linux_kernel_architecture.svg arch @@ -779,35 +593,7 @@ Linux 块 I/O 子系统处理读取和写入块设备数据的操作:创建块 :level: 2 :inline-contents: True - .. code-block:: text - - +---------------------------------+ - | 虚拟文件系统切换 | - +---------------------------------+ - ^ - | - v - +---------------------------------+ - | 设备映射器 | - +---------------------------------+ - ^ - | - v - +---------------------------------+ - | 通用块层 | - +---------------------------------+ - ^ - | - v - +--------------------------------+ - | I/O 调度程序 | - +--------------------------------+ - ^ ^ - | | - v v - +--------------+ +--------------+ - |块设备驱动程序 | | 块设备驱动程序 | - +--------------+ +--------------+ + .. image:: ../img/lectures/Block_IO_management.svg 虚拟文件系统 @@ -827,34 +613,7 @@ Linux 的虚拟文件系统(VFS)提供了一套通用的文件系统代码 :level: 2 :inline-contents: True - .. code-block:: text - - - ^ ^ ^ - | stat | open | read - v v v - +------------------------------------------------------------+ - | 虚拟文件系统 | - | | - | | - | /-------\ /--------\ /--------\ | - | | inode |<----------+ dentry |<----------+ FILE | | - | \---+---/ \----+---/ \---+----/ | - | | | | | - | | | | | - | v v v | - | +-------+ +--------+ +-------+ | - | | inode | | dentry | | page | | - | | cache | | cache | | cache | | - | +-------+ +--------+ +-------+ | - | | - +------------------------------------------------------------+ - ^ ^ - | | - v v - +-------------+ +-------------+ - | 文件系统驱动 | | 文件系统驱动 | - +-------------+ +-------------+ + .. image:: ../img/lectures/Virtual_Filesystem_Switch.svg Linux VFS 还实现了一个复杂的缓存机制,包括以下内容: @@ -874,38 +633,8 @@ Linux VFS 还实现了一个复杂的缓存机制,包括以下内容: :level: 2 :inline-contents: True - .. code-block:: text - - +---------------------------+ - | 伯克利套接字(socket)接口 | - +---------------------------+ - - +---------------------------+ - | 传输层(Transport layer) | - +-------------+-------------+ - | TCP | UDP | - +-------------+-------------+ - - +---------------------------+ - | 网络层(Network layer) | - +-----+---------+-----------+ - | IP | 路由 | NetFilter | - +-----+---------+-----------+ - - +---------------------------+ - |数据链路层(Data link layer)| - +-------+-------+-----------+ - | ETH | ARP | BRIDGING | - +-------+-------+-----------+ - - +--------------------------------+ - | 队列调度机制 | - | (Queuing discipline,qdisc) | - +--------------------------------+ - - +---------------------------+ - | 网络设备驱动程序 | - +---------------------------+ + .. image:: ../img/lectures/Monolithic_kernel.svg + Linux 安全模块 ......................