Files
maths-cs-ai-compendium-zh/images/concurrency_vs_parallelism.svg
flykhan 2536c937e3 feat: 完整中文翻译 maths-cs-ai-compendium(数学·计算机科学·AI 知识大全)
翻译自英文原版 maths-cs-ai-compendium,共 20 章全部完成。

第01章 向量 | 第02章 矩阵 | 第03章 微积分
第04章 统计学 | 第05章 概率论 | 第06章 机器学习
第07章 计算语言学 | 第08章 计算机视觉 | 第09章 音频与语音
第10章 多模态学习 | 第11章 自主系统 | 第12章 图神经网络
第13章 计算与操作系统 | 第14章 数据结构与算法
第15章 生产级软件工程 | 第16章 SIMD与GPU编程
第17章 AI推理 | 第18章 ML系统设计
第19章 应用人工智能 | 第20章 前沿人工智能

翻译说明:
- 所有数学公式 $...$ / $$...$$、代码块、图片引用完整保留
- mkdocs.yml 配置中文导航 + language: zh
- README.md 已翻译为中文(兼 docs/index.md)
- docs/ 目录包含指向各章文件的 symlink
- 约 29,000 行中文内容,排除 .cache/ 构建缓存
2026-05-03 10:23:20 +08:00

62 lines
4.9 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 220" width="700" height="220">
<text x="350" y="22" text-anchor="middle" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#333">Concurrency vs Parallelism</text>
<line x1="350" y1="35" x2="350" y2="210" stroke="#ccc" stroke-width="1" stroke-dasharray="4,3"/>
<!-- Concurrency (left) - one core, interleaved -->
<text x="175" y="52" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#3498db">Concurrency (1 core)</text>
<text x="175" y="68" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#3498db">interleaved execution</text>
<text x="40" y="100" text-anchor="start" font-family="Arial, sans-serif" font-size="10" fill="#666">Core:</text>
<!-- Time blocks interleaved -->
<rect x="80" y="85" width="40" height="24" rx="3" fill="#e74c3c" fill-opacity="0.4" stroke="#e74c3c" stroke-width="1"/>
<text x="100" y="101" text-anchor="middle" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#e74c3c">A</text>
<rect x="122" y="85" width="30" height="24" rx="3" fill="#3498db" fill-opacity="0.4" stroke="#3498db" stroke-width="1"/>
<text x="137" y="101" text-anchor="middle" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#3498db">B</text>
<rect x="154" y="85" width="35" height="24" rx="3" fill="#e74c3c" fill-opacity="0.4" stroke="#e74c3c" stroke-width="1"/>
<text x="171" y="101" text-anchor="middle" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#e74c3c">A</text>
<rect x="191" y="85" width="25" height="24" rx="3" fill="#27ae60" fill-opacity="0.4" stroke="#27ae60" stroke-width="1"/>
<text x="203" y="101" text-anchor="middle" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#27ae60">C</text>
<rect x="218" y="85" width="30" height="24" rx="3" fill="#3498db" fill-opacity="0.4" stroke="#3498db" stroke-width="1"/>
<text x="233" y="101" text-anchor="middle" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#3498db">B</text>
<rect x="250" y="85" width="40" height="24" rx="3" fill="#27ae60" fill-opacity="0.4" stroke="#27ae60" stroke-width="1"/>
<text x="270" y="101" text-anchor="middle" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#27ae60">C</text>
<!-- Time arrow -->
<line x1="80" y1="125" x2="300" y2="125" stroke="#999" stroke-width="1"/>
<text x="310" y="129" text-anchor="start" font-family="Arial, sans-serif" font-size="8" fill="#999">time →</text>
<text x="175" y="155" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#666">tasks take turns on one core</text>
<text x="175" y="170" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#666">not truly simultaneous</text>
<!-- Parallelism (right) - multiple cores, simultaneous -->
<text x="525" y="52" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#27ae60">Parallelism (4 cores)</text>
<text x="525" y="68" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#27ae60">simultaneous execution</text>
<text x="380" y="93" text-anchor="start" font-family="Arial, sans-serif" font-size="9" fill="#666">Core 1:</text>
<text x="380" y="113" text-anchor="start" font-family="Arial, sans-serif" font-size="9" fill="#666">Core 2:</text>
<text x="380" y="133" text-anchor="start" font-family="Arial, sans-serif" font-size="9" fill="#666">Core 3:</text>
<text x="380" y="153" text-anchor="start" font-family="Arial, sans-serif" font-size="9" fill="#666">Core 4:</text>
<!-- Simultaneous blocks -->
<rect x="440" y="80" width="200" height="18" rx="3" fill="#e74c3c" fill-opacity="0.4" stroke="#e74c3c" stroke-width="1"/>
<text x="540" y="93" text-anchor="middle" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#e74c3c">Task A</text>
<rect x="440" y="100" width="200" height="18" rx="3" fill="#3498db" fill-opacity="0.4" stroke="#3498db" stroke-width="1"/>
<text x="540" y="113" text-anchor="middle" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#3498db">Task B</text>
<rect x="440" y="120" width="200" height="18" rx="3" fill="#27ae60" fill-opacity="0.4" stroke="#27ae60" stroke-width="1"/>
<text x="540" y="133" text-anchor="middle" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#27ae60">Task C</text>
<rect x="440" y="140" width="200" height="18" rx="3" fill="#f39c12" fill-opacity="0.4" stroke="#f39c12" stroke-width="1"/>
<text x="540" y="153" text-anchor="middle" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#f39c12">Task D</text>
<text x="525" y="180" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#666">all tasks run at the same time</text>
<text x="525" y="195" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#666">requires multiple cores</text>
</svg>