diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index eb39cb0..9bc5158 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -13,12 +13,12 @@ "state": { "type": "markdown", "state": { - "file": "10-中间件/Netty核心原理.md", + "file": "10-中间件/Java NIO核心原理.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "Netty核心原理" + "title": "Java NIO核心原理" } } ] @@ -94,7 +94,7 @@ "state": { "type": "backlink", "state": { - "file": "10-中间件/Netty核心原理.md", + "file": "10-中间件/Java NIO核心原理.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -104,7 +104,7 @@ "unlinkedCollapsed": true }, "icon": "links-coming-in", - "title": "Netty核心原理 的反向链接列表" + "title": "Java NIO核心原理 的反向链接列表" } }, { @@ -113,12 +113,12 @@ "state": { "type": "outgoing-link", "state": { - "file": "10-中间件/Netty核心原理.md", + "file": "10-中间件/Java NIO核心原理.md", "linksCollapsed": false, "unlinkedCollapsed": true }, "icon": "links-going-out", - "title": "Netty核心原理 的出链列表" + "title": "Java NIO核心原理 的出链列表" } }, { @@ -156,13 +156,13 @@ "state": { "type": "outline", "state": { - "file": "10-中间件/Netty核心原理.md", + "file": "10-中间件/Java NIO核心原理.md", "followCursor": false, "showSearch": false, "searchQuery": "" }, "icon": "lucide-list", - "title": "Netty核心原理 的大纲" + "title": "Java NIO核心原理 的大纲" } }, { @@ -198,16 +198,21 @@ }, "active": "fcbc762a80282002", "lastOpenFiles": [ - "10-中间件/Buffer核心属性.excalidraw", - "10-中间件/Selector多路复用模型.excalidraw", + "10-中间件/零拷贝原理对比.md", + "10-中间件/Buffer核心属性.md", "10-中间件/Java NIO三大核心组件架构.excalidraw", "10-中间件/Java NIO核心原理.md", + "10-中间件/Java NIO三大核心组件架构.md", + "10-中间件/Selector多路复用模型.md", + "10-中间件/Buffer核心属性.excalidraw", + "10-中间件/零拷贝原理对比.excalidraw", + "10-中间件/Netty核心原理.md", + "10-中间件/Selector多路复用模型.excalidraw", "00-项目概述/项目概述.md", "questions/02-数据库/MyBatis核心原理.md", "Obsidian技能使用指南.md", "Obsidian可视化插件指南.md", "10-中间件/Netty实战场景.md", - "10-中间件/Netty核心原理.md", "10-中间件", "16-LeetCode Hot 100/从前序与中序遍历序列构造二叉树.md", "16-LeetCode Hot 100/路径总和.md", @@ -224,15 +229,10 @@ "16-LeetCode Hot 100/单词搜索.md", "16-LeetCode Hot 100/子集.md", "16-LeetCode Hot 100/最长回文子串.md", - "16-LeetCode Hot 100/括号生成.md", - "16-LeetCode Hot 100/删除链表的倒数第N个结点.md", - "16-LeetCode Hot 100/电话号码的字母组合.md", "16-LeetCode Hot 100", "00-项目概述", "questions/15-简历面试", "questions/14-Web3与区块链", - "12-面试技巧", - "08-算法与数据结构", - "questions/13-Golang语言" + "12-面试技巧" ] } \ No newline at end of file diff --git a/10-中间件/Buffer核心属性.md b/10-中间件/Buffer核心属性.md new file mode 100644 index 0000000..976542d --- /dev/null +++ b/10-中间件/Buffer核心属性.md @@ -0,0 +1,602 @@ +--- +excalidraw-plugin: parsed +tags: [excalidraw] +--- +==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving' + +# Excalidraw Data + +## Text Elements +%% +## Drawing +```json +{ + "type": "excalidraw", + "version": 2, + "source": "https://github.com/zsviczian/obsidian-excalidraw-plugin", + "elements": [ + { + "id": "title", + "type": "text", + "x": 350, + "y": 30, + "width": 500, + "height": 35, + "angle": 0, + "strokeColor": "#1e40af", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 1, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "Buffer 核心属性与操作方法", + "fontSize": 28, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "Buffer 核心属性与操作方法", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "buffer-title", + "type": "text", + "x": 480, + "y": 100, + "width": 240, + "height": 30, + "angle": 0, + "strokeColor": "#1e40af", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 2, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "Buffer 内存布局", + "fontSize": 24, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "Buffer 内存布局", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "processed-box", + "type": "rectangle", + "x": 150, + "y": 160, + "width": 200, + "height": 80, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 3, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "processed-label", + "type": "text", + "x": 200, + "y": 185, + "width": 100, + "height": 30, + "angle": 0, + "strokeColor": "#2b8a3e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 4, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "已处理数据", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "已处理数据", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "readwrite-box", + "type": "rectangle", + "x": 360, + "y": 160, + "width": 280, + "height": 80, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 5, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "readwrite-label", + "type": "text", + "x": 450, + "y": 185, + "width": 100, + "height": 30, + "angle": 0, + "strokeColor": "#1864ab", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 6, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "可读/写数据", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "可读/写数据", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "inaccessible-box", + "type": "rectangle", + "x": 650, + "y": 160, + "width": 200, + "height": 80, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffc9c9", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 7, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "inaccessible-label", + "type": "text", + "x": 690, + "y": 185, + "width": 120, + "height": 30, + "angle": 0, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 8, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "不可访问", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "不可访问", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "mark-label", + "type": "text", + "x": 150, + "y": 255, + "width": 70, + "height": 25, + "angle": 0, + "strokeColor": "#f59e0b", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 9, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "mark", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "mark", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "position-label", + "type": "text", + "x": 360, + "y": 255, + "width": 100, + "height": 25, + "angle": 0, + "strokeColor": "#3b82f6", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 10, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "position", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "position", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "limit-label", + "type": "text", + "x": 640, + "y": 255, + "width": 70, + "height": 25, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 11, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "limit", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "limit", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "capacity-label", + "type": "text", + "x": 850, + "y": 255, + "width": 100, + "height": 25, + "angle": 0, + "strokeColor": "#7c3aed", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 12, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "capacity", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "capacity", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "methods-box", + "type": "rectangle", + "x": 150, + "y": 320, + "width": 700, + "height": 200, + "angle": 0, + "strokeColor": "#5c7cfa", + "backgroundColor": "#d0ebff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 13, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "methods-title", + "type": "text", + "x": 410, + "y": 335, + "width": 180, + "height": 30, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 14, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "核心操作方法", + "fontSize": 24, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "核心操作方法", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "method1", + "type": "text", + "x": 180, + "y": 385, + "width": 300, + "height": 50, + "angle": 0, + "strokeColor": "#374151", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 15, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "mark「」\n标记当前 position 位置", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "mark「」\n标记当前 position 位置", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "method2", + "type": "text", + "x": 510, + "y": 385, + "width": 300, + "height": 50, + "angle": 0, + "strokeColor": "#374151", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 16, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "reset「」\n恢复到 mark 位置", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "reset「」\n恢复到 mark 位置", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "method3", + "type": "text", + "x": 180, + "y": 450, + "width": 300, + "height": 50, + "angle": 0, + "strokeColor": "#374151", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 17, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "clear「」\nposition=0, limit=capacity", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "clear「」\nposition=0, limit=capacity", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "method4", + "type": "text", + "x": 510, + "y": 450, + "width": 300, + "height": 50, + "angle": 0, + "strokeColor": "#374151", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 18, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "flip「」\nlimit=position, position=0", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "flip「」\nlimit=position, position=0", + "autoResize": true, + "lineHeight": 1.25 + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} +``` +%% \ No newline at end of file diff --git a/10-中间件/Java NIO三大核心组件架构.md b/10-中间件/Java NIO三大核心组件架构.md new file mode 100644 index 0000000..fb1bd23 --- /dev/null +++ b/10-中间件/Java NIO三大核心组件架构.md @@ -0,0 +1,95 @@ +--- +excalidraw-plugin: parsed +tags: [excalidraw] +--- +==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving' + +# Excalidraw Data + +## Text Elements +Java NIO 三大核心组件 ^title + +Channel ^4uxiOSKr + +数据通道 +双向数据流 +非阻塞I/O ^thM1aQV2 + +Buffer ^ZhHktmQf + +数据容器 +数据存储 +读写切换 ^bwZYl5Ts + +Selector ^EzyNSyMP + +多路复用器 +事件监听 +单线程管理多连接 ^xLILOaBV + +数据读写 ^30KtxT9O + +注册事件 ^b9QGv9Jt + +事件分发 ^W2YtCdM1 + +%% +## Drawing +```compressed-json +N4KAkARALgngDgUwgLgAQQQDwMYEMA2AlgCYBOuA7hADTgQBuCpAzoQPYB2KqATLZMzYBXUtiRoIACyhQ4zZAHoFAc0JRJQgEYA6bGwC2CgF7N6hbEcK4OCtptbErHALRY8RMpWdx8Q1TdIEfARcZgRmBShcZQUebR4ABm0ANho6IIR9BA4oZm4AbXAwUDBSiBJuaDVgtNLIWERKqCwoWrLMbgAWBIT+MphuAGZeosgKEnUhhOTtAA4AdgBORc7B + +2c755IBWZJ4tvshJBEJlaSH90YhrZRq0EbqIZihSNgBrBABhNnw2UkqAYgAjAhurgAGZtSCaXDYV7KF5CDjEL4/P4SZ7WZhwXCBHKQiBgwj4fAAZVgt3Qgg8+KeL3eAHUJpJuHxLrS3ggyTAKY9vhUDhAEacOOE8mhAQK2NjsGoBuKegL4cI4ABJYhi1D5AC6AoRSJFzA1HCExIFYQQxG4EsujBY7C4aFZD0IzAAIhlmpa0GCCGEBZphEiAKLBLI + +5DXagVCOD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Kbmbub1JITxwZgDLr4M8GsIhbIIQAXcAXBAkIkcIONrSEALSIAA== +``` +%% \ No newline at end of file diff --git a/10-中间件/Java NIO核心原理.md b/10-中间件/Java NIO核心原理.md index c9bb0bf..fcb9fa9 100644 --- a/10-中间件/Java NIO核心原理.md +++ b/10-中间件/Java NIO核心原理.md @@ -85,27 +85,7 @@ while (true) { ### 2. NIO 三大核心组件 -``` -┌────────────────────────────────────────┐ -│ Java NIO 架构 │ -├────────────────────────────────────────┤ -│ │ -│ ┌─────────┐ ┌─────────┐ │ -│ │Channel │◄──►│ Buffer │ │ -│ └────┬────┘ └─────────┘ │ -│ │ │ -│ ▼ │ -│ ┌─────────┐ │ -│ │Selector │ │ -│ │(多路复用)│ │ -│ └─────────┘ │ -│ │ -└────────────────────────────────────────┘ - -Channel: 数据通道(双向) -Buffer: 数据容器 -Selector: 多路复用器 -``` +![[Java NIO三大核心组件架构]] #### **核心组件关系** @@ -137,29 +117,7 @@ buffer.clear(); #### **工作原理** -``` -Selector 多路复用模型: - - ┌──────────────────────────────────┐ - │ Selector │ - │ │ - │ select() - 阻塞等待就绪事件 │ - │ │ - │ ┌────┐ ┌────┐ ┌────┐ │ - │ │Ch1 │ │Ch2 │ │Ch3 │ ... │ - │ │就绪│ │就绪│ │就绪│ │ - │ └────┘ └────┘ └────┘ │ - └──────────────────────────────────┘ - ▲ - │ one thread - │ - ┌─────────┴──────────┐ - │ Event Loop │ - │ - select() │ - │ - process() │ - │ - repeat │ - └────────────────────┘ -``` +![[Selector多路复用模型]] #### **SelectionKey 事件类型** @@ -307,25 +265,7 @@ sourceChannel.transferTo(0, sourceChannel.size(), destChannel); #### **Buffer 结构** -``` -Buffer 核心属性: - -┌───────┬──────────┬──────────┬─────────┐ -│ 0 │position │ limit │capacity │ -│ │ │ │ │ -│ 已处理 可读/写数据 │ 不可访问 │ -│ 数据 │ │ │ -└───────┴──────────┴──────────┴─────────┘ - ↑ ↑ ↑ - mark position limit - -操作方法: -- mark(): 标记当前 position -- reset(): 恢复到 mark 位置 -- clear(): position=0, limit=capacity -- flip(): limit=position, position=0 (读→写) -- rewind(): position=0, limit 不变 -``` +![[Buffer核心属性]] #### **Buffer 使用流程** @@ -439,17 +379,7 @@ if (bytesWritten == 0) { #### **传统 I/O vs 零拷贝** -``` -传统 I/O(4 次拷贝,4 次上下文切换): -1. 磁盘 → 内核缓冲区 (DMA) -2. 内核缓冲区 → 用户缓冲区 (CPU) -3. 用户缓冲区 → Socket 缓冲区 (CPU) -4. Socket 缓冲区 → 网卡 (DMA) - -零拷贝(2 次拷贝,2 次上下文切换): -1. 磁盘 → 内核缓冲区 (DMA) -2. 内核缓冲区 → 网卡 (DMA) -``` +![[零拷贝原理对比]] #### **transferTo 实现** diff --git a/10-中间件/Selector多路复用模型.md b/10-中间件/Selector多路复用模型.md new file mode 100644 index 0000000..d9001b2 --- /dev/null +++ b/10-中间件/Selector多路复用模型.md @@ -0,0 +1,513 @@ +--- +excalidraw-plugin: parsed +tags: [excalidraw] +--- +==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving' + +# Excalidraw Data + +## Text Elements +%% +## Drawing +```json +{ + "type": "excalidraw", + "version": 2, + "source": "https://github.com/zsviczian/obsidian-excalidraw-plugin", + "elements": [ + { + "id": "title", + "type": "text", + "x": 400, + "y": 30, + "width": 400, + "height": 35, + "angle": 0, + "strokeColor": "#1e40af", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 1, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "Selector 多路复用模型", + "fontSize": 28, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "Selector 多路复用模型", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "selector-container", + "type": "rectangle", + "x": 200, + "y": 120, + "width": 800, + "height": 250, + "angle": 0, + "strokeColor": "#f59e0b", + "backgroundColor": "#fff3bf", + "fillStyle": "solid", + "strokeWidth": 3, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 2, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "selector-box", + "type": "rectangle", + "x": 480, + "y": 145, + "width": 240, + "height": 80, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "#ffd8a8", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 3, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "selector-text", + "type": "text", + "x": 535, + "y": 160, + "width": 130, + "height": 50, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 4, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "Selector\nselect「」等待", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "Selector\nselect「」等待", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "channel1-box", + "type": "rectangle", + "x": 250, + "y": 270, + "width": 120, + "height": 60, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 5, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "channel1-text", + "type": "text", + "x": 275, + "y": 285, + "width": 70, + "height": 30, + "angle": 0, + "strokeColor": "#1864ab", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 6, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "Channel1\n就绪", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "Channel1\n就绪", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "channel2-box", + "type": "rectangle", + "x": 440, + "y": 270, + "width": 120, + "height": 60, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 7, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "channel2-text", + "type": "text", + "x": 465, + "y": 285, + "width": 70, + "height": 30, + "angle": 0, + "strokeColor": "#1864ab", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 8, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "Channel2\n就绪", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "Channel2\n就绪", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "channel3-box", + "type": "rectangle", + "x": 630, + "y": 270, + "width": 120, + "height": 60, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 9, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "channel3-text", + "type": "text", + "x": 655, + "y": 285, + "width": 70, + "height": 30, + "angle": 0, + "strokeColor": "#1864ab", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 10, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "Channel3\n就绪", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "Channel3\n就绪", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "channel-dots", + "type": "text", + "x": 800, + "y": 285, + "width": 50, + "height": 30, + "angle": 0, + "strokeColor": "#374151", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 11, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "...", + "fontSize": 24, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "...", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "eventloop-box", + "type": "rectangle", + "x": 400, + "y": 420, + "width": 400, + "height": 120, + "angle": 0, + "strokeColor": "#7c3aed", + "backgroundColor": "#d0bfff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 12, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "eventloop-title", + "type": "text", + "x": 520, + "y": 435, + "width": 160, + "height": 30, + "angle": 0, + "strokeColor": "#5f3dc4", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 13, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "Event Loop", + "fontSize": 24, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "Event Loop", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "eventloop-desc", + "type": "text", + "x": 420, + "y": 480, + "width": 360, + "height": 45, + "angle": 0, + "strokeColor": "#374151", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 14, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "• select「」 - 等待就绪事件\n• process「」 - 处理事件\n• repeat - 循环执行", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "• select「」 - 等待就绪事件\n• process「」 - 处理事件\n• repeat - 循环执行", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow-thread", + "type": "arrow", + "x": 600, + "y": 370, + "width": 0, + "height": 40, + "angle": 0, + "strokeColor": "#7c3aed", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 3, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 15, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [0, 40]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label-onethread", + "type": "text", + "x": 615, + "y": 380, + "width": 100, + "height": 20, + "angle": 0, + "strokeColor": "#7c3aed", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 16, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "单线程管理", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "单线程管理", + "autoResize": true, + "lineHeight": 1.25 + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} +``` +%% \ No newline at end of file diff --git a/10-中间件/零拷贝原理对比.excalidraw b/10-中间件/零拷贝原理对比.excalidraw new file mode 100644 index 0000000..40d1c68 --- /dev/null +++ b/10-中间件/零拷贝原理对比.excalidraw @@ -0,0 +1,1085 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "id": "title", + "type": "text", + "x": 350, + "y": 20, + "width": 500, + "height": 35, + "angle": 0, + "strokeColor": "#1e40af", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 1, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "零拷贝 vs 传统 I/O", + "fontSize": 28, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "零拷贝 vs 传统 I/O", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "traditional-box", + "type": "rectangle", + "x": 50, + "y": 100, + "width": 500, + "height": 400, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffe3e3", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 2, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "traditional-title", + "type": "text", + "x": 150, + "y": 120, + "width": 300, + "height": 30, + "angle": 0, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 3, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "传统 I/O「4次拷贝, 4次切换」", + "fontSize": 22, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "传统 I/O「4次拷贝, 4次切换」", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "disk-box", + "type": "rectangle", + "x": 100, + "y": 180, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#5c7cfa", + "backgroundColor": "#d0ebff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 4, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "disk-text", + "type": "text", + "x": 130, + "y": 190, + "width": 60, + "height": 30, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 5, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "磁盘", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "磁盘", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "kernel-box", + "type": "rectangle", + "x": 100, + "y": 280, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#f59e0b", + "backgroundColor": "#ffd8a8", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 6, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "kernel-text", + "type": "text", + "x": 110, + "y": 290, + "width": 100, + "height": 30, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 7, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "内核缓冲", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "内核缓冲", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "user-box", + "type": "rectangle", + "x": 100, + "y": 380, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 8, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "user-text", + "type": "text", + "x": 110, + "y": 390, + "width": 100, + "height": 30, + "angle": 0, + "strokeColor": "#2b8a3e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 9, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "用户缓冲", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "用户缓冲", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "socket-box", + "type": "rectangle", + "x": 380, + "y": 280, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#7c3aed", + "backgroundColor": "#d0bfff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 10, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "socket-text", + "type": "text", + "x": 390, + "y": 290, + "width": 100, + "height": 30, + "angle": 0, + "strokeColor": "#5f3dc4", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 11, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "Socket缓冲", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "Socket缓冲", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "nic-box", + "type": "rectangle", + "x": 380, + "y": 180, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffc9c9", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 12, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "nic-text", + "type": "text", + "x": 400, + "y": 190, + "width": 80, + "height": 30, + "angle": 0, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 13, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "网卡", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "网卡", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow1", + "type": "arrow", + "x": 160, + "y": 230, + "width": 0, + "height": 40, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 14, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [0, 40]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label1", + "type": "text", + "x": 175, + "y": 240, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 15, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "① DMA", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "① DMA", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow2", + "type": "arrow", + "x": 220, + "y": 305, + "width": 120, + "height": 60, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 16, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [120, 60]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label2", + "type": "text", + "x": 260, + "y": 320, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 17, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "② CPU", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "② CPU", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow3", + "type": "arrow", + "x": 220, + "y": 395, + "width": 120, + "height": -60, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 18, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [120, -60]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label3", + "type": "text", + "x": 260, + "y": 340, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 19, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "③ CPU", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "③ CPU", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow4", + "type": "arrow", + "x": 440, + "y": 280, + "width": 0, + "height": -40, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 20, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [0, -40]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label4", + "type": "text", + "x": 455, + "y": 240, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 21, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "④ DMA", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "④ DMA", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "zerocopy-box", + "type": "rectangle", + "x": 650, + "y": 100, + "width": 500, + "height": 400, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#d3f9d8", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 22, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "zerocopy-title", + "type": "text", + "x": 780, + "y": 120, + "width": 240, + "height": 30, + "angle": 0, + "strokeColor": "#2b8a3e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 23, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "零拷贝「2次拷贝, 2次切换」", + "fontSize": 22, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "零拷贝「2次拷贝, 2次切换」", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "disk2-box", + "type": "rectangle", + "x": 750, + "y": 180, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#5c7cfa", + "backgroundColor": "#d0ebff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 24, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "disk2-text", + "type": "text", + "x": 780, + "y": 190, + "width": 60, + "height": 30, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 25, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "磁盘", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "磁盘", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "kernel2-box", + "type": "rectangle", + "x": 750, + "y": 350, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#f59e0b", + "backgroundColor": "#ffd8a8", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 26, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "kernel2-text", + "type": "text", + "x": 760, + "y": 360, + "width": 100, + "height": 30, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 27, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "内核缓冲", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "内核缓冲", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "nic2-box", + "type": "rectangle", + "x": 980, + "y": 180, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffc9c9", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 28, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "nic2-text", + "type": "text", + "x": 1000, + "y": 190, + "width": 80, + "height": 30, + "angle": 0, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 29, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "网卡", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "网卡", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow5", + "type": "arrow", + "x": 810, + "y": 230, + "width": 0, + "height": 110, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 3, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 30, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [0, 110]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label5", + "type": "text", + "x": 825, + "y": 275, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 31, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "① DMA", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "① DMA", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow6", + "type": "arrow", + "x": 870, + "y": 350, + "width": 160, + "height": -120, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 3, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 32, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [160, -120]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label6", + "type": "text", + "x": 920, + "y": 280, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 33, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "② DMA", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "② DMA", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "benefit-box", + "type": "rectangle", + "x": 700, + "y": 430, + "width": 400, + "height": 50, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 34, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "benefit-text", + "type": "text", + "x": 740, + "y": 440, + "width": 320, + "height": 30, + "angle": 0, + "strokeColor": "#2b8a3e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 35, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "优势: 减少2次CPU拷贝, 减少2次上下文切换", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "优势: 减少2次CPU拷贝, 减少2次上下文切换", + "autoResize": true, + "lineHeight": 1.25 + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file diff --git a/10-中间件/零拷贝原理对比.md b/10-中间件/零拷贝原理对比.md new file mode 100644 index 0000000..354afaa --- /dev/null +++ b/10-中间件/零拷贝原理对比.md @@ -0,0 +1,1099 @@ +--- +excalidraw-plugin: parsed +tags: [excalidraw] +--- +==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving' + +# Excalidraw Data + +## Text Elements +%% +## Drawing +```json +{ + "type": "excalidraw", + "version": 2, + "source": "https://github.com/zsviczian/obsidian-excalidraw-plugin", + "elements": [ + { + "id": "title", + "type": "text", + "x": 350, + "y": 20, + "width": 500, + "height": 35, + "angle": 0, + "strokeColor": "#1e40af", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 1, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "零拷贝 vs 传统 I/O", + "fontSize": 28, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "零拷贝 vs 传统 I/O", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "traditional-box", + "type": "rectangle", + "x": 50, + "y": 100, + "width": 500, + "height": 400, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffe3e3", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 2, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "traditional-title", + "type": "text", + "x": 150, + "y": 120, + "width": 300, + "height": 30, + "angle": 0, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 3, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "传统 I/O「4次拷贝, 4次切换」", + "fontSize": 22, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "传统 I/O「4次拷贝, 4次切换」", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "disk-box", + "type": "rectangle", + "x": 100, + "y": 180, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#5c7cfa", + "backgroundColor": "#d0ebff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 4, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "disk-text", + "type": "text", + "x": 130, + "y": 190, + "width": 60, + "height": 30, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 5, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "磁盘", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "磁盘", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "kernel-box", + "type": "rectangle", + "x": 100, + "y": 280, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#f59e0b", + "backgroundColor": "#ffd8a8", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 6, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "kernel-text", + "type": "text", + "x": 110, + "y": 290, + "width": 100, + "height": 30, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 7, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "内核缓冲", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "内核缓冲", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "user-box", + "type": "rectangle", + "x": 100, + "y": 380, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 8, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "user-text", + "type": "text", + "x": 110, + "y": 390, + "width": 100, + "height": 30, + "angle": 0, + "strokeColor": "#2b8a3e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 9, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "用户缓冲", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "用户缓冲", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "socket-box", + "type": "rectangle", + "x": 380, + "y": 280, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#7c3aed", + "backgroundColor": "#d0bfff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 10, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "socket-text", + "type": "text", + "x": 390, + "y": 290, + "width": 100, + "height": 30, + "angle": 0, + "strokeColor": "#5f3dc4", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 11, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "Socket缓冲", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "Socket缓冲", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "nic-box", + "type": "rectangle", + "x": 380, + "y": 180, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffc9c9", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 12, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "nic-text", + "type": "text", + "x": 400, + "y": 190, + "width": 80, + "height": 30, + "angle": 0, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 13, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "网卡", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "网卡", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow1", + "type": "arrow", + "x": 160, + "y": 230, + "width": 0, + "height": 40, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 14, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [0, 40]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label1", + "type": "text", + "x": 175, + "y": 240, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 15, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "① DMA", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "① DMA", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow2", + "type": "arrow", + "x": 220, + "y": 305, + "width": 120, + "height": 60, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 16, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [120, 60]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label2", + "type": "text", + "x": 260, + "y": 320, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 17, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "② CPU", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "② CPU", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow3", + "type": "arrow", + "x": 220, + "y": 395, + "width": 120, + "height": -60, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 18, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [120, -60]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label3", + "type": "text", + "x": 260, + "y": 340, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 19, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "③ CPU", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "③ CPU", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow4", + "type": "arrow", + "x": 440, + "y": 280, + "width": 0, + "height": -40, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 20, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [0, -40]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label4", + "type": "text", + "x": 455, + "y": 240, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 21, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "④ DMA", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "④ DMA", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "zerocopy-box", + "type": "rectangle", + "x": 650, + "y": 100, + "width": 500, + "height": 400, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#d3f9d8", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 30, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 22, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "zerocopy-title", + "type": "text", + "x": 780, + "y": 120, + "width": 240, + "height": 30, + "angle": 0, + "strokeColor": "#2b8a3e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 23, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "零拷贝「2次拷贝, 2次切换」", + "fontSize": 22, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "零拷贝「2次拷贝, 2次切换」", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "disk2-box", + "type": "rectangle", + "x": 750, + "y": 180, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#5c7cfa", + "backgroundColor": "#d0ebff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 24, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "disk2-text", + "type": "text", + "x": 780, + "y": 190, + "width": 60, + "height": 30, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 25, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "磁盘", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "磁盘", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "kernel2-box", + "type": "rectangle", + "x": 750, + "y": 350, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#f59e0b", + "backgroundColor": "#ffd8a8", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 26, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "kernel2-text", + "type": "text", + "x": 760, + "y": 360, + "width": 100, + "height": 30, + "angle": 0, + "strokeColor": "#e67700", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 27, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "内核缓冲", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "内核缓冲", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "nic2-box", + "type": "rectangle", + "x": 980, + "y": 180, + "width": 120, + "height": 50, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffc9c9", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 28, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "nic2-text", + "type": "text", + "x": 1000, + "y": 190, + "width": 80, + "height": 30, + "angle": 0, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 29, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "网卡", + "fontSize": 20, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "网卡", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow5", + "type": "arrow", + "x": 810, + "y": 230, + "width": 0, + "height": 110, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 3, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 30, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [0, 110]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label5", + "type": "text", + "x": 825, + "y": 275, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 31, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "① DMA", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "① DMA", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "arrow6", + "type": "arrow", + "x": 870, + "y": 350, + "width": 160, + "height": -120, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 3, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 2}, + "seed": 32, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [[0, 0], [160, -120]], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "label6", + "type": "text", + "x": 920, + "y": 280, + "width": 80, + "height": 20, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 33, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "② DMA", + "fontSize": 16, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "middle", + "containerId": null, + "originalText": "② DMA", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "benefit-box", + "type": "rectangle", + "x": 700, + "y": 430, + "width": 400, + "height": 50, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": {"type": 3}, + "seed": 34, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "benefit-text", + "type": "text", + "x": 740, + "y": 440, + "width": 320, + "height": 30, + "angle": 0, + "strokeColor": "#2b8a3e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 35, + "version": 1, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "优势: 减少2次CPU拷贝, 减少2次上下文切换", + "fontSize": 18, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "优势: 减少2次CPU拷贝, 减少2次上下文切换", + "autoResize": true, + "lineHeight": 1.25 + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} +``` +%% \ No newline at end of file