<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Papers on Yuchen You</title>
    <link>https://www.whoami-wesleyyou.top/categories/papers/</link>
    <description>Recent content in Papers on Yuchen You</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <lastBuildDate>Wed, 04 Nov 2026 00:00:00 +0800</lastBuildDate>
    <atom:link href="https://www.whoami-wesleyyou.top/categories/papers/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Theseus: Runtime-Adaptive GPU Collective Communication with Hot-Swappable Schedules</title>
      <link>https://www.whoami-wesleyyou.top/2026/11/04/mlsys/theseus/</link>
      <pubDate>Wed, 04 Nov 2026 00:00:00 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/11/04/mlsys/theseus/</guid>
      <description>Theseus 的 Dynamic Selection, Hot Swapping 与资源树维护手写阅读笔记.</description>
    </item>
    <item>
      <title>Kimi Linear: An Expressive, Efficient Attention Architecture</title>
      <link>https://www.whoami-wesleyyou.top/2026/09/02/mlsys/LanguageModel/10.kimi-linear/</link>
      <pubDate>Wed, 02 Sep 2026 23:43:10 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/09/02/mlsys/LanguageModel/10.kimi-linear/</guid>
      <description>&lt;h2 id=&#34;整体架构&#34;&gt;整体架构&lt;/h2&gt;
&lt;p&gt;Kimi Linear 将 KDA 和 MLA 放在 Transformer 的 token-mixing 位置, 并采用 &lt;code&gt;3 个 KDA layers + 1 个 MLA layer&lt;/code&gt; 的排列; KDA 用固定大小的 recurrent state 处理历史信息, MLA 则保留 full attention 与 latent KV cache; 每个 token-mixing layer 后仍然连接一个 MoE layer, 整体数据流保持 &lt;code&gt;Norm -&amp;gt; KDA 或 MLA -&amp;gt; residual -&amp;gt; Norm -&amp;gt; MoE -&amp;gt; residual&lt;/code&gt;;&lt;/p&gt;
&lt;h2 id=&#34;kda-layer-的输入-状态更新与输出&#34;&gt;KDA layer 的输入, 状态更新与输出&lt;/h2&gt;
&lt;p&gt;生成第 $t+1$ 个 token 时, KDA layer $l$ 接收两个输入: 当前 token 从上一层传来的 hidden vector $h_t^{(l)}$, 以及本层处理完上一个 token 后留下的 recurrent state $S_{t-1}^{(l)}$; 前者沿模型深度方向在 layers 之间传递, 后者沿 token 时间方向保留在同一个 KDA layer 内;&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeToken: Efficient Edge-Native MoE Serving with Bandwidth-Adaptive Execution</title>
      <link>https://www.whoami-wesleyyou.top/2026/09/02/mlsys/Paper/FreeToken%20-%20Efficient%20Edge-Native%20MoE%20Serving%20with%20Bandwidth-Adaptive%20Execution/</link>
      <pubDate>Wed, 02 Sep 2026 21:27:27 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/09/02/mlsys/Paper/FreeToken%20-%20Efficient%20Edge-Native%20MoE%20Serving%20with%20Bandwidth-Adaptive%20Execution/</guid>
      <description>&lt;h2 id=&#34;背景&#34;&gt;背景&lt;/h2&gt;
&lt;p&gt;MoE 模型的总参数量虽然很大, 但每个 token 实际只会激活其中少量 experts, 因此 active parameters 远小于总参数量, 这个现象称为 sparse activation; 它让消费级 GPU 具备了计算大规模 MoE 模型的可能性, 因为 GPU 只需要执行当前激活的部分, 不需要同时计算完整的 expert pool;&lt;/p&gt;
&lt;p&gt;但是, 完整 expert pool 仍然可能远大于 GPU 显存, 因此需要主要保存在 host memory 中; FreeToken 希望把个人电脑的 GPU, CPU, memory 和 interconnect 组合成一个完整的 serving system; 当需要的 expert 没有命中 GPU cache 时, 系统可以将 expert weights 搬到 GPU 上计算, 也可以将较小的 activation tensor 传到 CPU 侧直接计算;&lt;/p&gt;</description>
    </item>
    <item>
      <title>3. Speculative Decoding</title>
      <link>https://www.whoami-wesleyyou.top/2026/07/23/mlsys/LanguageModel/3.speculativedecoding/</link>
      <pubDate>Thu, 23 Jul 2026 14:17:34 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/07/23/mlsys/LanguageModel/3.speculativedecoding/</guid>
      <description>&lt;h2 id=&#34;speculative-decoding-的朴素思想&#34;&gt;Speculative Decoding 的朴素思想&lt;/h2&gt;
&lt;p&gt;想要加速一个 auto-regressive 模型的推理, 可以先猜测合理的上下文, 再让大模型一次验证多个位置; 比如已经有 prefix, 小模型先猜出 &lt;code&gt;I love cats&lt;/code&gt;, 大模型验证后保留 &lt;code&gt;I love&lt;/code&gt;, 在 &lt;code&gt;cats&lt;/code&gt; 这里拒绝并补出 &lt;code&gt;dogs&lt;/code&gt;, 后面基于 &lt;code&gt;cats&lt;/code&gt; 生成的内容就不能继续保留;&lt;/p&gt;
&lt;p&gt;这里有两个角色: &lt;strong&gt;Draft Model&lt;/strong&gt; 负责快速生成候选, &lt;strong&gt;Target Model&lt;/strong&gt; 负责验证和确定最终输出; 上面的例子是在说明接受前缀和截断的位置, 随机 sampling 下的接受规则还需要下面的概率推导;&lt;/p&gt;</description>
    </item>
    <item>
      <title>7.cachegen</title>
      <link>https://www.whoami-wesleyyou.top/2026/07/16/mlsys/InferenceEngine/7.cachegen/</link>
      <pubDate>Thu, 16 Jul 2026 13:46:08 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/07/16/mlsys/InferenceEngine/7.cachegen/</guid>
      <description>&lt;h2 id=&#34;背景&#34;&gt;背景&lt;/h2&gt;
&lt;h3 id=&#34;tokenwise-locality&#34;&gt;Tokenwise locality&lt;/h3&gt;
&lt;h3 id=&#34;layerwise-sensitivity-to-loss&#34;&gt;Layerwise sensitivity to loss&lt;/h3&gt;
&lt;h2 id=&#34;encoding-和-decoding&#34;&gt;Encoding 和 Decoding&lt;/h2&gt;
&lt;h3 id=&#34;delta-encoding&#34;&gt;Delta Encoding&lt;/h3&gt;
&lt;p&gt;我们在构建搜索引擎的底层存储编码格式的时候用过一个 Delta Encoding/Decoding 的思路，将对应 token 坐标通过相对位置来存储，可以让大数字变成较小的相对位移来存储来减少存储量；这里用到了非常类似的思路: 对于一个 token 的值 (KV cache)，我们用相对于前面值的变化量来存储，当然在这里需要一个 microbench 来说明这个存储在 token kv 背景下确实可以减少存储量:&lt;/p&gt;</description>
    </item>
    <item>
      <title>2. FlashAttention</title>
      <link>https://www.whoami-wesleyyou.top/2026/07/15/mlsys/LanguageModel/2.flashattention/</link>
      <pubDate>Wed, 15 Jul 2026 21:30:24 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/07/15/mlsys/LanguageModel/2.flashattention/</guid>
      <description>&lt;h2 id=&#34;复杂度分析从-flops-到-hbm-ios&#34;&gt;复杂度分析：从 FLOPS 到 HBM IOs&lt;/h2&gt;
&lt;p&gt;传统计算的优化，比如 gemm 的 cublas 实现分析都是专注于减少一个计算中 gpu flops 的数量，但是实际上 gpu 的高速内存 SRAM 和相对低速内存 HBM 的读写 IO 率也是影响整体程序性能的重要的因素；因此本文提出做一个 IO-aware attention kernel 来减少 IO 吞吐数量&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;flashattention_problem_statement.png&#34; loading=&#34;lazy&#34; src=&#34;https://www.whoami-wesleyyou.top/images/flashattention_problem_statement.png&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;tiling&#34;&gt;Tiling&lt;/h2&gt;
&lt;p&gt;传统 gemm 中的 tiling 是指每次处理一个 block 而不是完整读写一整个行向量，这样可以提升 io 的连续性从而提升性能；但是这里的 attention 计算不能直接用 gemm 的优化，因为存在一个 需要全局 reduce 的 softmax 函数，并且需要用到全局最大值来做 max trick，这个其实是很不利于 tiling 这样分块的实现的&lt;/p&gt;</description>
    </item>
    <item>
      <title>1. MoE 架构</title>
      <link>https://www.whoami-wesleyyou.top/2026/07/14/mlsys/LanguageModel/1.moe/</link>
      <pubDate>Tue, 14 Jul 2026 11:05:09 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/07/14/mlsys/LanguageModel/1.moe/</guid>
      <description>&lt;h2 id=&#34;challenge&#34;&gt;Challenge&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;GPU 并不像 CPU 那么适合做 branching 操作，如果我们在 kernel 中写一个 if-else 指令，那么两个 branch 的函数执行都会被放到解释器这里来，导致执行速度慢于完全并行同等操作;&lt;/li&gt;
&lt;li&gt;如果让 batch inference 请求同时通过这个 moe-FFN 层, 这个 batch 内必须统一 expert 而不能分开;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt=&#34;moe_fundamental_structure.png&#34; loading=&#34;lazy&#34; src=&#34;https://www.whoami-wesleyyou.top/images/moe_fundamental_structure.png&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;主要框架&#34;&gt;主要框架&lt;/h2&gt;
&lt;p&gt;标准公式&lt;/p&gt;
&lt;div class=&#34;math-display&#34;&gt;$$&amp;#10;y = \Sigma_{i=1}^{n} G_i(x) E_i(x)&amp;#10;$$&lt;/div&gt;
&lt;p&gt;这里的 $G$ 指的是 gating, 用于将输入的 x 向量映射到 n 个 experts 对应的输出用于表示权重; 这里 G 就是一个可训练的神经网络, 可以写作&lt;/p&gt;</description>
    </item>
    <item>
      <title>6. sglang</title>
      <link>https://www.whoami-wesleyyou.top/2026/07/11/mlsys/InferenceEngine/6.sglang/</link>
      <pubDate>Sat, 11 Jul 2026 20:57:19 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/07/11/mlsys/InferenceEngine/6.sglang/</guid>
      <description>&lt;p&gt;这篇作品和十多年前的 Spark 的设计非常类似，都是 frontend (DSL) &amp;ndash; runtime codesign 来实现全局的加速;&lt;/p&gt;
&lt;h2 id=&#34;frontend-with-dsl&#34;&gt;Frontend with DSL&lt;/h2&gt;
&lt;h2 id=&#34;runtime-radix-attention&#34;&gt;Runtime (Radix Attention)&lt;/h2&gt;
&lt;h3 id=&#34;解决的问题&#34;&gt;解决的问题&lt;/h3&gt;
&lt;p&gt;还是针对 KV cache 的计算角度，sglang 希望能解决不同 request 之间的 prefix 共享问题，尤其是在 system prompt 存在的情况下，很多时候的 system prompt 是大多数请求共享的，并不需要每次都计算，这样可以节省很多计算量;&lt;/p&gt;</description>
    </item>
    <item>
      <title>3. PagedAttention and the vLLM Engine</title>
      <link>https://www.whoami-wesleyyou.top/2026/07/07/mlsys/InferenceEngine/3.vllm/</link>
      <pubDate>Tue, 07 Jul 2026 23:27:49 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/07/07/mlsys/InferenceEngine/3.vllm/</guid>
      <description>&lt;h2 id=&#34;kv-cache-优化的讨论&#34;&gt;KV Cache 优化的讨论&lt;/h2&gt;
&lt;p&gt;对于一个 Transformer Block, 我们应该有 token tensor -&amp;gt; projection -&amp;gt; attention -&amp;gt; FFN 这几个核心步骤; 那么使用 kv cache 的话在 decode 阶段可以把 attention 计算的复杂度降低到 $O(N)$，并且这个可以同时利好 projection 和后续的 ffn 让其不再需要处理完整的 prompt 而是只有最后一个新的 token; 因此 kv cache 的 &lt;strong&gt;存在&lt;/strong&gt; 可以极大地优化一个 decode 推理流程;&lt;/p&gt;</description>
    </item>
    <item>
      <title>2. Orca: Iteration Level Scheduling and Selective Batching</title>
      <link>https://www.whoami-wesleyyou.top/2026/07/07/mlsys/InferenceEngine/2.orca/</link>
      <pubDate>Tue, 07 Jul 2026 14:04:10 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/07/07/mlsys/InferenceEngine/2.orca/</guid>
      <description>&lt;h2 id=&#34;prefill-阶段的计算复杂度&#34;&gt;Prefill 阶段的计算复杂度&lt;/h2&gt;
&lt;p&gt;工业常见 dense LLM 的 hidden dimension 大概是 4K 到 16K 量级&lt;/p&gt;
&lt;h2 id=&#34;无法-batch-的几种情况&#34;&gt;无法 batch 的几种情况&lt;/h2&gt;
&lt;p&gt;其实卡住 batch 的原因都是在 attention 模块的计算部分&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;两个进程都在 prefill 阶段但是二者张量的形状不同;
&lt;ul&gt;
&lt;li&gt;prefill 阶段二者都要计算完整的 $softmax(\frac{QK^t}{\sqrt{d_k}})V$, 如果要一起计算就需要 $X.shape(-1)$ 和 $X.shape(-2)$ 分别相等，也就是张量形状一致;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;两个进程都在 decode 阶段但是二者的 token id 不同;
&lt;ul&gt;
&lt;li&gt;decode 阶段计算是最后一个 token 对应的 query 去和前面所有的 K 和 V 做匹配，如果二者的 index 不同，说明其前面的 K 和 V 的行数 (sequence id/维度) 不同，从而导致形状不同&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;两个进程处在不同的 p/d 阶段;
&lt;ul&gt;
&lt;li&gt;计算量不同，一个是矩阵 times 向量; 一个是矩阵 times 矩阵&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;orca-的局限性&#34;&gt;Orca 的局限性&lt;/h2&gt;
&lt;p&gt;Orca 的设计目的是实现 iteration level scheduling 的问题，一次 iteration 就是 transformer 完整的模块吐出一个 token 的粒度，那么在这个粒度内部，如果存在 prefill 和 decode 并行的情况，那么我们会注意到问题:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mem0 - Building Production-Ready AI Agents with Scalable Long-Term Memory</title>
      <link>https://www.whoami-wesleyyou.top/2026/06/26/agentsys/memory/Mem0%20-%20Building%20Production-Ready%20AI%20Agents%20with%20Scalable%20Long-Term%20Memory/</link>
      <pubDate>Fri, 26 Jun 2026 03:09:58 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/06/26/agentsys/memory/Mem0%20-%20Building%20Production-Ready%20AI%20Agents%20with%20Scalable%20Long-Term%20Memory/</guid>
      <description>&lt;aside class=&#34;note-callout callout-note&#34;&gt;
    &lt;div class=&#34;callout-title&#34;&gt;Mem0 记忆管线的黑话&lt;/div&gt;
    &lt;div class=&#34;callout-body&#34;&gt;&lt;ul&gt;
&lt;li&gt;extraction phase: 从新一轮对话里提炼候选事实, 写入路径的第一步&lt;/li&gt;
&lt;li&gt;update phase: 候选事实和已有记忆对账, 决定 ADD / UPDATE / DELETE / NOOP&lt;/li&gt;
&lt;li&gt;$\Omega$: extraction 吐出的候选记忆集合&lt;/li&gt;
&lt;li&gt;$S$: 异步刷新的全局对话摘要, 提供&amp;quot;远景&amp;quot;&lt;/li&gt;
&lt;li&gt;tool call: LLM 自己选操作并执行的 function-calling 接口&lt;/li&gt;
&lt;li&gt;Mem0$^g$: 把记忆表示从自然语言换成知识图谱的变体&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/aside&gt;&lt;h2 id=&#34;mem0-在-memory-光谱里的位置&#34;&gt;Mem0 在 memory 光谱里的位置&lt;/h2&gt;
&lt;p&gt;agent memory 这一堆框架, 区分它们最有用的是两个轴: 记忆的&lt;strong&gt;表示&lt;/strong&gt; (自然语言 / 向量 / 图 / 时序图) 和记忆的&lt;strong&gt;生命周期&lt;/strong&gt; (写入 $\rightarrow$ 检索 $\rightarrow$ 更新 $\rightarrow$ 遗忘);&lt;/p&gt;</description>
    </item>
    <item>
      <title>MemGPT - Towards LLMs as Operating Systems</title>
      <link>https://www.whoami-wesleyyou.top/2026/05/20/agentsys/memory/MemGPT%20-%20Towards%20LLMs%20as%20Operating%20Systems/</link>
      <pubDate>Wed, 20 May 2026 06:09:26 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/05/20/agentsys/memory/MemGPT%20-%20Towards%20LLMs%20as%20Operating%20Systems/</guid>
      <description>&lt;aside class=&#34;note-callout callout-note&#34;&gt;
    &lt;div class=&#34;callout-title&#34;&gt;MemGPT 的 OS 类比词典&lt;/div&gt;
    &lt;div class=&#34;callout-body&#34;&gt;&lt;ul&gt;
&lt;li&gt;main context: LLM 的 context window, 类比物理 RAM&lt;/li&gt;
&lt;li&gt;external context: 向量库 / 关系库 / 日志, 类比 disk&lt;/li&gt;
&lt;li&gt;function call: 模型主动触发的 I/O, 类比 system call&lt;/li&gt;
&lt;li&gt;queue manager: FIFO 驱逐器, 类比 page replacement policy&lt;/li&gt;
&lt;li&gt;heartbeat: 定时唤醒, 类比 timer interrupt&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/aside&gt;&lt;h2 id=&#34;context-window-的硬上限&#34;&gt;Context Window 的硬上限&lt;/h2&gt;
&lt;p&gt;现有商用 LLM 每次 forward 能看到的 token 数是有限的, 比如 GPT-4 turbo 是 128K, Llama-2-chat 是 4K; 一旦 input + output 超出这个窗口, 后续内容要么被截断, 要么只能靠外部检索 (classic RAG) 在推理前硬塞进去;&lt;/p&gt;</description>
    </item>
    <item>
      <title>ZeRO - memory optimizations toward training trillion parameter models</title>
      <link>https://www.whoami-wesleyyou.top/2026/05/20/mlsys/Paper/ZeRO%20-%20memory%20optimizations%20toward%20training%20trillion%20parameter%20models/</link>
      <pubDate>Wed, 20 May 2026 06:00:30 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/05/20/mlsys/Paper/ZeRO%20-%20memory%20optimizations%20toward%20training%20trillion%20parameter%20models/</guid>
      <description>&lt;aside class=&#34;note-callout callout-note&#34;&gt;
    &lt;div class=&#34;callout-title&#34;&gt;并行理论的黑称&lt;/div&gt;
    &lt;div class=&#34;callout-body&#34;&gt;&lt;ul&gt;
&lt;li&gt;Vertical Split: 竖切, PP&lt;/li&gt;
&lt;li&gt;Horizontal Split: 横切, TP&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/aside&gt;&lt;h2 id=&#34;消耗显存的模块分类&#34;&gt;消耗显存的模块分类&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Part&lt;/th&gt;
					&lt;th&gt;Category&lt;/th&gt;
					&lt;th&gt;Included Items&lt;/th&gt;
					&lt;th&gt;Description&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;1&lt;/td&gt;
					&lt;td&gt;&lt;strong&gt;Model&lt;/strong&gt; states&lt;/td&gt;
					&lt;td&gt;optimizer states, gradients, parameters&lt;/td&gt;
					&lt;td&gt;For large models, the &lt;strong&gt;majority&lt;/strong&gt; of the memory is occupied by model states.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;2&lt;/td&gt;
					&lt;td&gt;&lt;strong&gt;Residual&lt;/strong&gt; states&lt;/td&gt;
					&lt;td&gt;activation, temporary buffers, unusable fragmented memory&lt;/td&gt;
					&lt;td&gt;The &lt;strong&gt;remaining&lt;/strong&gt; memory is consumed by residual states.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;model-state-不足分析--zero-dp-性能&#34;&gt;Model State 不足分析 + ZeRO-DP 性能&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Parallelism Method&lt;/th&gt;
					&lt;th&gt;Why Compute Efficiency Is High / Low&lt;/th&gt;
					&lt;th&gt;Why Memory Efficiency Is High / Low&lt;/th&gt;
					&lt;th&gt;Core Mechanism&lt;/th&gt;
					&lt;th&gt;Main Problem&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;Data Parallelism (DP)&lt;/td&gt;
					&lt;td&gt;&lt;strong&gt;High compute efficiency&lt;/strong&gt; because each GPU runs the full model &lt;strong&gt;independently&lt;/strong&gt; on its own mini-batch, so computation is &lt;strong&gt;large-grained and continuous&lt;/strong&gt;, and communication is mainly limited to gradient synchronization.&lt;/td&gt;
					&lt;td&gt;&lt;strong&gt;Low memory efficiency&lt;/strong&gt; because each GPU stores a full copy of all model states, including parameters, gradients, and optimizer states.&lt;/td&gt;
					&lt;td&gt;Replicate the full model on every GPU, split data across GPUs, then synchronize gradients.&lt;/td&gt;
					&lt;td&gt;Heavy memory redundancy across GPUs.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Model Parallelism (MP)&lt;/td&gt;
					&lt;td&gt;&lt;strong&gt;Low compute efficiency&lt;/strong&gt; because one model computation is split across multiple GPUs, which introduces fine-grained coordination, frequent synchronization, and expensive communication on the critical path.&lt;/td&gt;
					&lt;td&gt;&lt;strong&gt;High memory efficiency&lt;/strong&gt; because each GPU stores only a partition of the model states instead of the full model.&lt;/td&gt;
					&lt;td&gt;Partition the model itself across GPUs so each GPU holds only part of the parameters / states.&lt;/td&gt;
					&lt;td&gt;Communication overhead, synchronization cost, and reduced scalability.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;ZeRO-DP&lt;/td&gt;
					&lt;td&gt;Tries to &lt;strong&gt;retain the high compute efficiency of DP&lt;/strong&gt; by preserving DP-style computation granularity and communication pattern as much as possible.&lt;/td&gt;
					&lt;td&gt;Tries to &lt;strong&gt;achieve the high memory efficiency of MP&lt;/strong&gt; by partitioning model states across data-parallel processes instead of fully replicating them.&lt;/td&gt;
					&lt;td&gt;Keep DP-style training flow, but partition optimizer states, gradients, and eventually parameters to remove redundancy.&lt;/td&gt;
					&lt;td&gt;More complex state management and dynamic communication scheduling.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;img alt=&#34;ZeRO_model_state_compression_results.png&#34; loading=&#34;lazy&#34; src=&#34;https://www.whoami-wesleyyou.top/images/ZeRO_model_state_compression_results.png&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve</title>
      <link>https://www.whoami-wesleyyou.top/2026/05/20/mlsys/Paper/Taming%20Throughput-Latency%20Tradeoff%20in%20LLM%20Inference%20with%20Sarathi-Serve/</link>
      <pubDate>Wed, 20 May 2026 06:00:23 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/05/20/mlsys/Paper/Taming%20Throughput-Latency%20Tradeoff%20in%20LLM%20Inference%20with%20Sarathi-Serve/</guid>
      <description>&lt;p&gt;Sarathi-Serve 把 prefill 分块, 再与正在运行的 decode 请求混合调度, 目标是兼顾吞吐与 token 生成延迟. 这里讨论的是同一 serving 系统中的调度方式, prefill/decode 可以在同一个 batch 中执行. &lt;a href=&#34;https://www.usenix.org/conference/osdi24/presentation/agrawal&#34;&gt;原论文, OSDI 2024&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;prefill-vs-decode&#34;&gt;Prefill vs. Decode&lt;/h2&gt;
&lt;h3 id=&#34;prefill-阶段做了什么&#34;&gt;Prefill 阶段做了什么&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;prefill = 对整个 prompt 做一次完整的 transformer forward.&lt;/strong&gt;&lt;br&gt;
包括了:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;对所有输入 token 一起做 embedding&lt;/li&gt;
&lt;li&gt;过每一层的 attention&lt;/li&gt;
&lt;li&gt;过每一层的 FFN&lt;/li&gt;
&lt;li&gt;同时把每层对应的 K/V 写入 KV cache&lt;/li&gt;
&lt;li&gt;最后根据最后位置的 hidden state 过 lm head, 得到 next-token logits&lt;/li&gt;
&lt;li&gt;采样 / greedy / top-k / top-p, 选出第一个输出 token&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;较长的 prompt 提供了足够多可以一起计算的 token, 能提高矩阵运算的算术强度. 在论文讨论的配置下, prefill 通常表现为 &lt;strong&gt;compute-bound&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Megatron-LM - Training Multi-Billion Parameter Language Models Using Model Parallelism</title>
      <link>https://www.whoami-wesleyyou.top/2026/05/20/mlsys/Paper/Megatron-LM%20-%20Training%20Multi-Billion%20Parameter%20Language%20Models%20Using%20Model%20Parallelism/</link>
      <pubDate>Wed, 20 May 2026 05:34:48 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/05/20/mlsys/Paper/Megatron-LM%20-%20Training%20Multi-Billion%20Parameter%20Language%20Models%20Using%20Model%20Parallelism/</guid>
      <description>&lt;h2 id=&#34;attention-计算的线性代数问题&#34;&gt;Attention 计算的线性代数问题&lt;/h2&gt;
&lt;h3 id=&#34;attention-和-ffn-的关系&#34;&gt;attention 和 FFN 的关系&lt;/h3&gt;
&lt;p&gt;如果记某层输入为 x, 那么可以粗略理解成:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;attention 输出: 给 x 补充上下文信息, 像&amp;quot;开会听别人说话&amp;quot;&lt;/li&gt;
&lt;li&gt;FFN 输出: 给 x 补充局部计算后的新特征, - 像&amp;quot;你自己在脑子里消化, 归纳, 形成判断&amp;quot;&lt;br&gt;
如果我们尝试&lt;strong&gt;把一个 FFN 层变成一个 attention 层&lt;/strong&gt;, 结果就是可能会更加适合长距离语义传输但是缺少本地语义特征变换器&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;多层-attention-ffn-结构&#34;&gt;多层 attention-FFN 结构&lt;/h3&gt;
&lt;p&gt;可以理解为不断重复&amp;quot;交换信息 $\rightarrow$ 消化信息 $\rightarrow$ 再交换 $\rightarrow$ 再消化&amp;quot;&lt;br&gt;
也就是说各自对本 token 处于上下文的含义理解之后再次进行交换分享，让整体的文意理解更加深刻&lt;/p&gt;</description>
    </item>
    <item>
      <title>GPipe - efficient training of giant neural networks using pipeline parallelism</title>
      <link>https://www.whoami-wesleyyou.top/2026/05/20/mlsys/Paper/GPipe%20-%20efficient%20training%20of%20giant%20neural%20networks%20using%20pipeline%20parallelism/</link>
      <pubDate>Wed, 20 May 2026 05:34:29 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/05/20/mlsys/Paper/GPipe%20-%20efficient%20training%20of%20giant%20neural%20networks%20using%20pipeline%20parallelism/</guid>
      <description>&lt;h2 id=&#34;神经网络基础&#34;&gt;神经网络基础&lt;/h2&gt;
&lt;p&gt;&lt;img alt=&#34;nano-MLP&#34; loading=&#34;lazy&#34; src=&#34;https://www.whoami-wesleyyou.top/images/nano-MLP.svg&#34;&gt;&lt;br&gt;
如图是一个基础的神经网络结构, 我们这里首先要明确几个函数:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;每一层内部的计算是 $h_i := \sigma(z_i)$, $z_i := W_i h_{i-1} + b_i$&lt;/li&gt;
&lt;li&gt;我们最终的输出函数是 $L :=$loss(sample; forward)&lt;/li&gt;
&lt;li&gt;forward: 指的是从输入样本数据 $h_0$ 到 最终输出 $\sigma(z_2)$ 的所有计算过程&lt;/li&gt;
&lt;li&gt;backward: 从 $L$ 开始不断计算每一层中的 $\frac{\partial L}{\partial W_i}$ 和 $\frac{\partial L}{\partial b_i}$ 的方向梯度, 然后用这个来不断更新 $W_i,\ b_i$&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;现在来拆解一下反向传播的过程: 基本根据的是莱布尼茨链式法则 (chain-rule)&lt;/p&gt;</description>
    </item>
    <item>
      <title>21. The Design and Implementation of a Log-Structured File System</title>
      <link>https://www.whoami-wesleyyou.top/2025/10/06/computer_system_basics/os/historical/21.lfs/</link>
      <pubDate>Mon, 06 Oct 2025 13:07:17 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/10/06/computer_system_basics/os/historical/21.lfs/</guid>
      <description>&lt;h2 id=&#34;design-for-file-systems-of-the-1990s&#34;&gt;Design for File Systems of the 1990&amp;rsquo;s&lt;/h2&gt;
&lt;p&gt;文件系统的设计受到两种力量驱动:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;技术 (Technology)&lt;/strong&gt;: 提供基本的硬件能力与性能边界;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;工作负载 (Workload)&lt;/strong&gt;: 决定系统需要高效完成的操作类型;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;本节总结了 1990 年代的技术变迁及其对文件系统设计的影响, 并说明为何当时的传统文件系统难以适应这些变化, 从而引出了 &lt;strong&gt;Sprite LFS(Log-Structured File System)&lt;/strong&gt; 的设计动机;&lt;/p&gt;</description>
    </item>
    <item>
      <title>20. Lottery Scheduling: Flexible Proportional-Share Resource Management</title>
      <link>https://www.whoami-wesleyyou.top/2025/10/01/computer_system_basics/os/historical/20.lottery_scheduling/</link>
      <pubDate>Wed, 01 Oct 2025 20:38:57 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/10/01/computer_system_basics/os/historical/20.lottery_scheduling/</guid>
      <description>&lt;h2 id=&#34;lottery-scheduling-基本机制&#34;&gt;Lottery Scheduling 基本机制&lt;/h2&gt;
&lt;h3 id=&#34;resource-rights-资源权利&#34;&gt;Resource Rights (资源权利)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;彩票 (ticket)&lt;/strong&gt; 表示资源权利, 具有 &lt;strong&gt;三个性质&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;抽象 (abstract): 与具体机器细节无关;&lt;/li&gt;
&lt;li&gt;相对 (relative): 票所代表的份额随竞争情况 (总彩票数量) 动态变化;&lt;/li&gt;
&lt;li&gt;统一 (uniform): 异构资源都能抽象为 tickets; 比如各种 CPU, I/O 设备;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;lotteries-抽签调度&#34;&gt;Lotteries (抽签调度)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;每次调度就是一次抽签, 任务的获胜概率: $p = \frac{t}{T}$, 其中 t = 本任务票数, T = 总票数;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;获胜次数服从 &lt;strong&gt;binomial distribution&lt;/strong&gt;; 等待第一次获胜的时间服从 &lt;strong&gt;geometric distribution&lt;/strong&gt;;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;长期看, 任务的资源份额 $\approx$ 票份额; 因此保证概率公平 (probabilistic fairness);&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;任何持有 &lt;strong&gt;非零&lt;/strong&gt; 票数的任务都会在有限时间内赢得抽签, 因此不会出现饿死 (starvation);&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;问题: 如果一个任务的彩票数量很少, 为什么不会 starvation? 它被运行的概率不是应该很低吗?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;回答: 只要任务持有的票数大于零, 它在每次抽签中都有非零的获胜概率;虽然概率可能很小, 但等待时间服从几何分布, 期望为 1/p, 是有限的;因此平均响应时间有限, 任务最终一定会运行, 不会像传统优先级调度中那样被永久饿死;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>19. Scheduler Activations: Effective Kernel Support  for the User-Level Management of Parallelism</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/30/computer_system_basics/os/historical/19.scheduler_activation/</link>
      <pubDate>Tue, 30 Sep 2025 21:23:07 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/30/computer_system_basics/os/historical/19.scheduler_activation/</guid>
      <description>&lt;h2 id=&#34;背景&#34;&gt;背景&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;并行计算的效果, 取决于创建和管理并行的开销; 开销大的话即使 coarse grained parallelism 也不划算; 开销小的话, 即使 fine grained parallelism 也划算;&lt;/li&gt;
&lt;li&gt;传统 UNIX 进程 = 单地址空间 + 单执行流;&lt;/li&gt;
&lt;li&gt;设计目标是单核多道程序环境(multiprogramming), 适合粗粒度并行, 不适合细粒度并行;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;线程支持的两种方式&#34;&gt;线程支持的两种方式&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;用户级线程 (User-level threads)&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;通过 runtime library 库实现(不改内核);&lt;/li&gt;
&lt;li&gt;优点:
&lt;ul&gt;
&lt;li&gt;性能好: 上下文切换, 创建销毁的代价接近过程调用;&lt;/li&gt;
&lt;li&gt;灵活: 可以按语言/应用需求定制;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;缺点:
&lt;ul&gt;
&lt;li&gt;内核对线程不可见, 仍然只认识&amp;quot;进程&amp;quot;;&lt;/li&gt;
&lt;li&gt;进程就像虚拟 CPU, 被内核调度到物理 CPU 上;&lt;/li&gt;
&lt;li&gt;遇到 I/O 阻塞, 页面缺页, 多道并发 时, 线程库感知不到真实 CPU 情况, 导致性能下降甚至错误;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;内核级线程 (Kernel threads)&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;内核直接提供多线程支持, 每个线程对内核可见, 内核负责调度;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;优点:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;与系统资源和调度机制直接集成, 没有&amp;quot;virtual/real processor 错位&amp;quot;的问题;&lt;/li&gt;
&lt;li&gt;不会出现用户级线程那种 &amp;ldquo;一挂全挂&amp;rdquo;(比如一个线程阻塞整个进程);&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;缺点:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;内核操作比用户空间 heavyweight 得多;&lt;/li&gt;
&lt;li&gt;性能明显比用户级线程差 (通常差一个数量级);&lt;/li&gt;
&lt;li&gt;对于很多并行程序仍然&amp;quot;太重&amp;quot;;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ULT 库会在程序启动时调用内核 API(比如现代系统里 pthread_create())来创建一批内核线程;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;数量一般与物理 CPU 数接近, 用来&amp;quot;占位&amp;quot;, 相当于&amp;quot;虚拟 CPU 池&amp;quot;;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ULT 线程 &lt;strong&gt;绑定&lt;/strong&gt; 在这些 KLT 上运行&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;每个内核线程里跑的是用户线程库的调度循环;&lt;/li&gt;
&lt;li&gt;库自己决定哪个用户线程在这个内核线程里执行;&lt;/li&gt;
&lt;li&gt;所以用户线程确实是基于内核线程执行的;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Memory Resource Management in VMware ESX Server</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/29/computer_system_basics/os/historical/18.vmware_esx_mem/</link>
      <pubDate>Mon, 29 Sep 2025 13:19:27 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/29/computer_system_basics/os/historical/18.vmware_esx_mem/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;VMware ESX Server is a thin software layer designed to multiplex hardware resources efficiently among virtual machines. The current system virtualizes the Intel IA-32 architecture&lt;/p&gt;
&lt;p&gt;In contrast, ESX Server manages system hardware directly, providing significantly higher I/O performance and complete control over resource management.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;machine addr: real hardware address&lt;/li&gt;
&lt;li&gt;physical addr: guest OS&amp;rsquo;s address&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pmap&lt;/code&gt;: data structure for each VM that maps physical addr to machine addr (ppn -&amp;gt; mpn)
&lt;ul&gt;
&lt;li&gt;注意这就是 EPT 的功能, 只是 2002 年 Intel 还没有 EPT 技术&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;reclamation-mechanisms&#34;&gt;Reclamation Mechanisms&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;每个虚拟机都会有一个 constant max size (Virtual Mem), 也就是一旦启动之后就不会变了&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;overcommit-过量使用后收回页替换机制&#34;&gt;Overcommit: 过量使用后收回页替换机制&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;如果出现 ESX 宿主机承诺了过量的内存页使用量, 就会出现问题: 如何回收? 如果使用基于 pmap 的额外页表机制, 就还要改一下接口, 也就是撤回的页必须以 (VM, Vaddr) 这样的 tuple 形式才能让 ESX 实现页的撤回, 也就是 &lt;strong&gt;Meta-level Page Replacement&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;但是 ESX/VMM 层并不能知道哪个页更适合 evict, 这只有 guest OS 才知道&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Double Paging Problem&lt;/strong&gt;: 这样设计也会导致 double paging 的问题, VMM 撤回了某个特定的 (VM, page), 但是该 VM 在同时也在对应 page 写入了新的内容, 这样就会出现 inconsistency&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;balloon-机制&#34;&gt;Balloon 机制&lt;/h3&gt;
&lt;p&gt;&lt;img alt=&#34;esx_balloon.png&#34; loading=&#34;lazy&#34; src=&#34;https://www.whoami-wesleyyou.top/images/esx_balloon.png&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>My VM is Lighter (and Safer) than your Container</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/23/computer_system_basics/os/historical/15.vm_lighter_than_container/</link>
      <pubDate>Tue, 23 Sep 2025 19:03:49 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/23/computer_system_basics/os/historical/15.vm_lighter_than_container/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;背景&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;容器(Docker/LXC)在工业界广泛应用: Google, AWS, Azure, GCP 都依赖容器;&lt;/li&gt;
&lt;li&gt;容器优势:
&lt;ul&gt;
&lt;li&gt;快速实例化(毫秒~百毫秒)&lt;/li&gt;
&lt;li&gt;高密度运行(单机可数千~上万实例)&lt;/li&gt;
&lt;li&gt;内存占用小, 镜像体积小&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;问题&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;安全性不足:
&lt;ul&gt;
&lt;li&gt;容器暴露 &lt;strong&gt;400+ syscalls&lt;/strong&gt;, 内核攻击面巨大;&lt;/li&gt;
&lt;li&gt;隔离性不如 VM, 常需要&amp;quot;容器运行在 VM 内&amp;quot;来补强;&lt;/li&gt;
&lt;li&gt;资源滥用(fork bomb, 文件描述符耗尽)可导致宿主机 DoS;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;目标&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;结合容器的轻量性与 VM 的强隔离;&lt;/li&gt;
&lt;li&gt;需求:
&lt;ul&gt;
&lt;li&gt;毫秒级实例化&lt;/li&gt;
&lt;li&gt;高密度运行&lt;/li&gt;
&lt;li&gt;小镜像/低内存占用&lt;/li&gt;
&lt;li&gt;快速挂起/恢复&lt;/li&gt;
&lt;li&gt;保持 VM 的硬件隔离安全性&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;贡献&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;分析 Xen 性能瓶颈, 重构控制面:
&lt;ul&gt;
&lt;li&gt;移除 XenStore (&lt;strong&gt;noxs&lt;/strong&gt;), 消除中心化瓶颈;&lt;/li&gt;
&lt;li&gt;新工具链 &lt;strong&gt;chaos/libchaos&lt;/strong&gt; + &lt;strong&gt;split toolstack&lt;/strong&gt;;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;提出 &lt;strong&gt;Tinyx&lt;/strong&gt; 工具, 生成极小 Linux VM; 支持 unikernel;&lt;/li&gt;
&lt;li&gt;实现 &lt;strong&gt;LightVM&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>The Turtles Project: Design and Implementation of Nested Virtualization</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/22/computer_system_basics/os/historical/14.turtle_IBM/</link>
      <pubDate>Mon, 22 Sep 2025 12:50:08 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/22/computer_system_basics/os/historical/14.turtle_IBM/</guid>
      <description>&lt;p&gt;Authors: Muli Ben-Yehuda et al., IBM Research / IBM Linux Technology Center&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;1-背景与动机&#34;&gt;1. 背景与动机&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;传统虚拟化 (single-level)&lt;/strong&gt;: 一个 hypervisor (L0) 管理多个 VM, 每个 VM 运行 OS;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;嵌套虚拟化 (nested virtualization)&lt;/strong&gt;: 允许一个 hypervisor (L1) 作为 guest 运行, 并且还能继续运行自己的 VM (L2);&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;需求来源&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;现代操作系统自带虚拟化功能&lt;/strong&gt;(Windows XP mode in Win7, Linux 内置 KVM);&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IaaS 场景&lt;/strong&gt;: 云提供商 (L0) 希望用户能运行自己的 hypervisor (L1), 自己管理 VM (L2);&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;研究和测试&lt;/strong&gt;: 嵌套虚拟化方便调试/benchmark hypervisor;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;安全性&lt;/strong&gt;: 可以研究/防御 hypervisor-level rootkit;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;iaas-infrastructure-as-a-service&#34;&gt;IaaS (Infrastructure as a Service)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;云计算三层服务之一: IaaS / PaaS / SaaS;&lt;/li&gt;
&lt;li&gt;IaaS = 提供虚拟化的计算资源(VM, 存储, 网络);&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;例子&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;AWS EC2: 创业公司快速租用 VM, 按需扩展;&lt;/li&gt;
&lt;li&gt;Google Cloud GPU: 科研人员租用 A100 GPU VM;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;与论文关系: 云提供商必须支持 nested virtualization, 才能让用户在 VM 内运行自己的 hypervisor;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&#34;2-虚拟化理论基础&#34;&gt;2. 虚拟化理论基础&lt;/h2&gt;
&lt;h3 id=&#34;popekgoldberg-1974&#34;&gt;Popek–Goldberg (1974)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;三大条件&lt;/strong&gt;: 等价性 (equivalence), 资源控制 (resource control), 效率 (efficiency);&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;定理&lt;/strong&gt;: 如果架构中所有 &lt;strong&gt;sensitive 指令&lt;/strong&gt; 都是 &lt;strong&gt;privileged 指令&lt;/strong&gt;, 则该架构是可虚拟化的;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;影响&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;解释了早期 x86 &lt;strong&gt;不可完全虚拟化&lt;/strong&gt; $\rightarrow$ VMware 使用二进制翻译绕过;&lt;/li&gt;
&lt;li&gt;推动了 Intel/AMD 添加 VT-x / SVM 硬件扩展;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&#34;3-两种嵌套虚拟化模型&#34;&gt;3. 两种嵌套虚拟化模型&lt;/h2&gt;
&lt;h3 id=&#34;1-multi-level-support&#34;&gt;1) Multi-level support&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;硬件直接支持多层 hypervisor;&lt;/li&gt;
&lt;li&gt;Trap 从 L2 直接交给 L1;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;例子&lt;/strong&gt;: IBM System z;&lt;/li&gt;
&lt;li&gt;高效, 但硬件设计复杂; 且一般多层的支持都是有限的, 如只支持两层, 这篇论文是在理论上支持任意层数的嵌套虚拟化, 因此更高层的虚拟化实际上还是依赖于单层虚拟化的软件支持逻辑: &lt;strong&gt;compress&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;2-single-level-support&#34;&gt;2) Single-level support&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;硬件只有一层 root mode (L0);&lt;/li&gt;
&lt;li&gt;所有 trap(无论来自 L1, L2, L3)&lt;strong&gt;都掉到 L0&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;L0 决定是否转发给 L1;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;例子&lt;/strong&gt;: x86 的 Intel VT-x (VMX), AMD SVM;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiplexing single-level&lt;/strong&gt;: L0 将唯一的一层虚拟化能力&amp;quot;复用&amp;quot;, 对上层 L1/L2 进行模拟;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&#34;4-cpu-虚拟化-vmx&#34;&gt;4. CPU 虚拟化 (VMX)&lt;/h2&gt;
&lt;h3 id=&#34;vmx--l0&#34;&gt;VMX &amp;amp; L0&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;VMX&lt;/strong&gt; = Intel VT-x 的指令扩展集;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;L0&lt;/strong&gt; = 唯一运行在 VMX root mode 的 hypervisor;&lt;/li&gt;
&lt;li&gt;所有 VMExit/VMEntry 都必须经过 L0;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Trap 流程&lt;/strong&gt;: Single-level support: L2 trap $\rightarrow$ L0 trap handler $\rightarrow$ L0 转发给 L1;&lt;/p&gt;</description>
    </item>
    <item>
      <title>A Comparison of Software and Hardware Techniques for x86 Virtualization</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/21/computer_system_basics/os/historical/13.x86virt_comp/</link>
      <pubDate>Sun, 21 Sep 2025 20:22:43 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/21/computer_system_basics/os/historical/13.x86virt_comp/</guid>
      <description>&lt;p&gt;The main technical contributions of this paper are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;a review of VMware Workstation&amp;rsquo;s software VMM, focusing on performance properties of the virtual instruction execution engine;&lt;/li&gt;
&lt;li&gt;a review of the emerging hardware support, identifying performance trade-offs;&lt;/li&gt;
&lt;li&gt;a quantitative performance comparison of a software and a hardware VMM.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Establishes &lt;strong&gt;three essential characteristics&lt;/strong&gt; for system software to be considered a VMM&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Fidelity(保真性)&lt;/strong&gt; Software on the VMM executes identically to its execution on hardware, barring timing effects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance(高性能)&lt;/strong&gt; An overwhelming majority of guest instructions are executed by the hardware without the intervention of the VMM.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Safety(安全性)&lt;/strong&gt; The VMM manages all hardware resources.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;1-基础概念&#34;&gt;1. 基础概念&lt;/h2&gt;
&lt;h3 id=&#34;vmm-vs-hypervisor&#34;&gt;VMM vs Hypervisor&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;VMM (Virtual Machine Monitor)&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;来自 Popek &amp;amp; Goldberg (1974), 强调核心虚拟化功能(trap &amp;amp; emulate, BT, shadow structures);&lt;/li&gt;
&lt;li&gt;负责虚拟机执行控制;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Hypervisor&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;工程上更常用的术语, 指整个虚拟化层;&lt;/li&gt;
&lt;li&gt;包含 VMM, 同时提供调度, 资源分配, 设备模型, 管理接口;&lt;/li&gt;
&lt;li&gt;Type 1(bare-metal, 如 Xen, ESXi), Type 2(hosted, 如 VMware Workstation);&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Xen and the Art of Virtualization</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/15/computer_system_basics/os/historical/12.xen/</link>
      <pubDate>Mon, 15 Sep 2025 20:16:57 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/15/computer_system_basics/os/historical/12.xen/</guid>
      <description>&lt;h2 id=&#34;背景&#34;&gt;背景&lt;/h2&gt;
&lt;p&gt;应用设计需要一个稳定的环境, 而传统的 OS 隔离技术不足以支持这种要求, 比如一个程序消耗了大量的算力并且被 scheduler 赋予了非常高的优先级, 或者系统被程序攻击了, 从而被某个其他进程消耗了很多资源导致当前进程的性能受损, 因此需要更高层的 VM 设计来实现工业界需要的 isolation 级别&lt;/p&gt;</description>
    </item>
    <item>
      <title>Disco: Running Commodity Operating Systems on Scalable Multiprocessors</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/15/computer_system_basics/os/historical/11.disco/</link>
      <pubDate>Mon, 15 Sep 2025 13:17:28 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/15/computer_system_basics/os/historical/11.disco/</guid>
      <description>&lt;p&gt;这篇论文是 VMware 的基石论文&lt;/p&gt;
&lt;h2 id=&#34;历史背景和硬件&#34;&gt;历史背景和硬件&lt;/h2&gt;
&lt;p&gt;在上世纪 90 年代, 硬件设计已经非常厉害了, 但是多个商业系统跑在一个硬件机器上非常困难, 因此这篇论文设计了一个模式:&lt;br&gt;
在 hardware 和 os 之间添加一个中间层, &lt;strong&gt;类似&lt;/strong&gt; 于一个 vmm 来进行隔离&lt;/p&gt;
&lt;p&gt;这里的硬件背景:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Stanford FLASH shared memory multiprocessor&lt;/li&gt;
&lt;li&gt;experimental cache coherent non-uniform memory architecture (ccNUMA)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;传统的不足&#34;&gt;传统的不足&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;硬件的革新需要 significant OS changes&lt;/li&gt;
&lt;li&gt;OS 本体代码量过大并不适合修改来适配硬件&lt;/li&gt;
&lt;li&gt;buggy/incompatible system software can significantly impact the success of such machines&lt;/li&gt;
&lt;li&gt;commodity OS system software 具有 constraints + inflexibility 的缺点&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;关键词&#34;&gt;关键词&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;scalable&lt;/strong&gt;: 设计的系统可以适配不同的(未来的)硬件
&lt;ul&gt;
&lt;li&gt;意味着系统设计能随着处理器数量的增加(几十到几百个 CPU)依然保持良好性能&lt;/li&gt;
&lt;li&gt;传统系统只有少量 cpu 并且用一条总线通信, 但是随着 cpu 数量增加, 总线会成为瓶颈&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;UMA&lt;/strong&gt;: 统一内存访问, 所有 cpu 访问内存的速度相同, 也就是用上文的总线通信, 随着 cpu 数量增加, 总线压力增大, 性能下降&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NUMA&lt;/strong&gt;: 非统一内存访问, 每个 cpu 有自己的本地内存, 访问本地内存速度快, 访问其他 cpu 的内存速度慢, 这样随着 cpu 数量增加, 性能下降不明显&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ccNUMA 的 cc&lt;/strong&gt;: cache-coherent, 每个 cpu 有自己的缓存, 但是缓存之间需要保持一致性, 这样可以提高性能,但是也增加了复杂度
&lt;ul&gt;
&lt;li&gt;常见方式是 &lt;strong&gt;目录协议 (directory-based coherence)&lt;/strong&gt;, 每个内存块有一个目录记录谁缓存了它, 当有更新时通知或失效这些缓存&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;flexible&lt;/strong&gt;: 可以适配不同的 OS (注意 scalable 强调的是硬件的多样性, flexible 强调的是软件的多样性)
&lt;ul&gt;
&lt;li&gt;系统能支持多样化的使用场景, 工作负载和配置, 而不是只能针对单一情况优化&lt;/li&gt;
&lt;li&gt;这里着重强调对 variety of workloads 的支持, 例如 cpu 密集型, io 密集型, 内存密集型等&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;commodity OS&lt;/strong&gt;: 现成的, 广泛使用的操作系统, 例如 Linux, Windows, 能应对各种应用场景, 但缺乏针对特定硬件的优化&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;specialized OS&lt;/strong&gt;: 针对特定硬件或应用场景优化的操作系统, 例如实时操作系统, 嵌入式系统, 但缺乏通用性&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;shared memory multiprocessor&lt;/strong&gt;: 多个处理器可以访问同一块内存
&lt;ul&gt;
&lt;li&gt;所有处理器访问 同一个全局内存地址空间(不像分布式系统那样各有独立内存);
&lt;ul&gt;
&lt;li&gt;好处: 编程模型更简单(多个 CPU 看起来就像在同一个大内存上操作);&lt;/li&gt;
&lt;li&gt;问题: 容易出现 内存访问冲突 和 一致性问题;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FLASH 硬件&lt;/strong&gt;: 多个节点, 每个节点有 CPU, 内存和 I/O, 通过高速互连组成; 采用目录协议保持缓存一致性, 因此对软件呈现的是一个 共享内存多处理器, 带有 NUMA 特性&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;vm-方案的缺点&#34;&gt;VM 方案的缺点&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Overheads(性能开销)&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;需要软件模拟特权指令, 虚拟化 I/O, 带来额外异常处理和执行开销;&lt;/li&gt;
&lt;li&gt;每个 VM 都要复制 OS 和应用的代码/数据, 还会重复维护大内存结构(如文件系统 buffer cache), 导致内存浪费;&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Resource Management (资源管理问题)&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;VMM 缺乏操作系统的高层语义, 只能&amp;quot;盲目&amp;quot;调度;&lt;/li&gt;
&lt;li&gt;例如无法区分 idle loop (busy waiting 对 vmm 层透明) 与有效计算, 可能浪费 CPU 时间; 也无法知道某页内存是否已不再使用, 导致内存分配效率低;&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;Communication and Sharing(通信与共享困难)&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;不同 VM 之间的文件, 磁盘, 应用难以共享;&lt;/li&gt;
&lt;li&gt;例如在 VM/370 上, 一个用户的虚拟磁盘若被一个 VM 占用, 另一个 VM 无法访问;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;作者观点: 虽然这些缺点依然存在, 但通过结合现代操作系统对分布式环境的支持, 以及 VMM 的新设计技巧, 它们的影响可以大大减轻;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mach: A New Kernel Foundation For UNIX Development</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/13/computer_system_basics/os/historical/6.Mach/</link>
      <pubDate>Sat, 13 Sep 2025 16:04:59 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/13/computer_system_basics/os/historical/6.Mach/</guid>
      <description>&lt;h2 id=&#34;mach-system&#34;&gt;Mach System&lt;/h2&gt;
&lt;h3 id=&#34;硬件平台-hardware&#34;&gt;硬件平台 (Hardware)&lt;/h3&gt;
&lt;p&gt;Mach 最初运行在 DEC VAX 系列机器上, 后来被移植到 IBM RT PC, Sun-3 (68k), Encore Multimax, Sequent Symmetry 等多处理器系统;&lt;br&gt;
这些平台通常配备 &lt;strong&gt;数 MB 到数十 MB 的内存 (RAM)&lt;/strong&gt;, &lt;strong&gt;数百 MB 到数 GB 的磁盘存储&lt;/strong&gt;, 以当时标准算是中高端配置;&lt;br&gt;
通过这些硬件, Mach 展示了良好的可移植性和对对称多处理器 (SMP) 的支持, 并能在有限资源下探索虚拟内存与分布式操作系统的先进机制;&lt;/p&gt;</description>
    </item>
    <item>
      <title>On μ-Kernel Construction</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/13/computer_system_basics/os/historical/7.micro-Kernel/</link>
      <pubDate>Sat, 13 Sep 2025 16:04:51 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/13/computer_system_basics/os/historical/7.micro-Kernel/</guid>
      <description>&lt;h2 id=&#34;on--kernel-construction&#34;&gt;On $\mu$-Kernel Construction&lt;/h2&gt;
&lt;p&gt;传统观点是, 微内核是 &lt;em&gt;inefficient&lt;/em&gt; 和 &lt;em&gt;not sufficiently flexible&lt;/em&gt; 的, 但是本文说明相反观点, 并展示微内核可以达到 macro kernel 的 efficiency&lt;br&gt;
以及为什么当前已有的 measurement 很难说明这一点&lt;/p&gt;
&lt;h3 id=&#34;设计目标&#34;&gt;设计目标&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;微内核支持 modular&lt;/li&gt;
&lt;li&gt;外部系统可以使用 micro kernel 提供的 mechanism&lt;/li&gt;
&lt;li&gt;微内核系统更加 flexible 和 tailorable&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;明确-target&#34;&gt;明确 target&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;决定整个 $\mu$-kernel 的能力的不应该是 performance, 而应该是 functionality&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;也就是说尽量不要把指令放进内核, 除非纯外部执行无法完成指定任务&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;系统应该能支持 protection&lt;/li&gt;
&lt;li&gt;independence principle: 不同 sub system 之间不应该有任何互相影响和 corruption&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;这里的子系统指的是进程, 也就是用户态的资源分割单位&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start=&#34;4&#34;&gt;
&lt;li&gt;integrity principle: 不同子系统之间应该有 address 联系, 也就是进程能通过地址来互相通信&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;address-space&#34;&gt;Address Space&lt;/h3&gt;
&lt;p&gt;从硬件来看地址空间就是 virtual addr 到 physical addr 的映射, 这是通过 TLB 和 page table 来实现的&lt;/p&gt;</description>
    </item>
    <item>
      <title>Exokernel: An Operating System Architecture for Application-Level Resource Management</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/13/computer_system_basics/os/historical/9.exokernel/</link>
      <pubDate>Sat, 13 Sep 2025 16:04:42 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/13/computer_system_basics/os/historical/9.exokernel/</guid>
      <description>&lt;h1 id=&#34;exokernel-an-operating-system-architecture-for-application-level-resource-management&#34;&gt;Exokernel: An Operating System Architecture for Application-Level Resource Management&lt;/h1&gt;
&lt;p&gt;“Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T. Laboratory for Computer Science” (&lt;a href=&#34;#ZgotmplZ&#34;&gt;Engler 等, p. 251&lt;/a&gt;) (&lt;a href=&#34;#ZgotmplZ&#34;&gt;pdf&lt;/a&gt;)&lt;/p&gt;
&lt;h2 id=&#34;motivation&#34;&gt;Motivation&lt;/h2&gt;
&lt;p&gt;传统的 general OS kernel 只能提供给最广泛的用户态程序一个中庸的最优解，然而随着软件界的发展，越来越需要一种对各种不同的软件有各自 customized 方案的特殊化优化&lt;/p&gt;</description>
    </item>
    <item>
      <title>Plan 9 from Bell Labs</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/13/computer_system_basics/os/historical/5.Plan9_9P/</link>
      <pubDate>Sat, 13 Sep 2025 16:04:35 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/13/computer_system_basics/os/historical/5.Plan9_9P/</guid>
      <description>&lt;h2 id=&#34;plan-9-system-bell-lab&#34;&gt;Plan 9 System (Bell Lab)&lt;/h2&gt;
&lt;h3 id=&#34;硬件设备&#34;&gt;硬件设备&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;目标环境: 便宜的小型机(办公室个人使用)+ 集中管理的大型服务器(file server, cpu server)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;分布式环境设计, 强调网络互联和资源共享&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;UTF-8&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;/proc&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;rfork&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;&lt;p&gt;硬件存储抽象&lt;br&gt;
软件文件系统抽象&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;包括网络的分布式一致性&lt;br&gt;
创新点&lt;/p&gt;
&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;h3 id=&#34;设计目标&#34;&gt;设计目标&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;maintainence: 分布式的个人 pc 进行 administer 一个系统的开销太大太困难了&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;也就是通过 centralized administration 来实现集中管理&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;统一接口: 一切皆文件, 通过 9P 协议访问&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;每个进程拥有独立的命名空间, 可通过 &lt;code&gt;bind&lt;/code&gt; 和 &lt;code&gt;mount&lt;/code&gt; 重新组合&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;支持透明分布式: 远程资源与本地资源无差别&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;简洁内核, 核心任务是 9P 消息的 &lt;strong&gt;multiplex/demultiplex&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>The Performance of μ-Kernel-Based Systems</title>
      <link>https://www.whoami-wesleyyou.top/2025/09/08/computer_system_basics/os/historical/8.L4/</link>
      <pubDate>Mon, 08 Sep 2025 16:30:05 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/09/08/computer_system_basics/os/historical/8.L4/</guid>
      <description>&lt;h2 id=&#34;motivation-和论文目标&#34;&gt;Motivation 和论文目标&lt;/h2&gt;
&lt;p&gt;守旧派往往认为, 第一代 $\mu$-kernel  微内核具有非常低的 performance/flexibility, 但是本文希望能测试第二代微内核的性能和灵活性, 实验手段是测试一些老的系统性能测试以及加上一些新的有针对的测试&lt;/p&gt;
&lt;p&gt;微内核的优点之一是, 内核小巧, 部件坏的概率小&lt;/p&gt;
&lt;p&gt;微内核只提供 mechanism 但是不提供 policy, 但是也需要上面一层安全控制的 pager, FS 等资源, 这些往往依赖于 UNIX Server 实现&lt;/p&gt;</description>
    </item>
    <item>
      <title>7. Gray Failure the Achilles&#39; Heel of Cloud-Scale Systems</title>
      <link>https://www.whoami-wesleyyou.top/2025/06/01/computer_system_basics/os/OrderLab/7.%20Gray%20Failure%20the%20Achilles%27%20Heel%20of%20Cloud-Scale%20Systems/</link>
      <pubDate>Sun, 01 Jun 2025 17:16:15 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/06/01/computer_system_basics/os/OrderLab/7.%20Gray%20Failure%20the%20Achilles%27%20Heel%20of%20Cloud-Scale%20Systems/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;这篇文章系统性地提出并定义了云计算系统中的&amp;quot;灰色故障&amp;quot;(Gray Failure)问题, 认为它是当前云基础设施高可用性的一大障碍&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;gray failure&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;component failures whose manifestations are fairly subtle&lt;br&gt;
and thus defy quick and definitive detection&lt;/p&gt;
&lt;p&gt;系统某部分发生了轻微但持续的问题, 这些问题不易被传统故障检测机制发现, 但已经影响了应用层的性能和可用性;它不同于&amp;quot;失败即停&amp;quot; (fail-stop) 故障, 后者更易被监测和处理&lt;/p&gt;</description>
    </item>
    <item>
      <title>6. Fail Stutter Fault Tolerance</title>
      <link>https://www.whoami-wesleyyou.top/2025/05/31/computer_system_basics/os/OrderLab/6.%20Fail%20Stutter%20Fault%20Tolerance%202001/</link>
      <pubDate>Sat, 31 May 2025 18:32:49 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/05/31/computer_system_basics/os/OrderLab/6.%20Fail%20Stutter%20Fault%20Tolerance%202001/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;h3 id=&#34;背景问题缺陷&#34;&gt;背景问题缺陷&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Byzantine 模型假设组件可能出现任意错误甚至恶意行为, &lt;strong&gt;过于复杂难以实施&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;Fail-stop 模型假设组件要么正常工作, 要么完全停止, 虽然简单易用, 但&lt;strong&gt;忽视了现代硬件中常见的&amp;quot;性能故障&amp;quot;&lt;/strong&gt;;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;本文特点&#34;&gt;本文特点&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Fail-Stutter 模型&lt;/strong&gt;&lt;/em&gt;: a realistic and yet tractable fault model that accounts for both absolute failure and a new range of performance failures common in modern components.&lt;/p&gt;</description>
    </item>
    <item>
      <title>5. Fail-Slow at Scale</title>
      <link>https://www.whoami-wesleyyou.top/2025/05/27/computer_system_basics/os/OrderLab/5.%20Fail-Slow%20at%20Scale/</link>
      <pubDate>Tue, 27 May 2025 15:11:00 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/05/27/computer_system_basics/os/OrderLab/5.%20Fail-Slow%20at%20Scale/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;这篇论文 &lt;em&gt;Fail-Slow at Scale: Evidence of Hardware Performance Faults in Large Production Systems&lt;/em&gt; 由Haryadi S. Gunawi等人发表在第16届USENIX文件与存储技术会议(FAST 2018)上&lt;/p&gt;
&lt;p&gt;系统性地揭示了在大规模生产系统中&amp;quot;fail-slow&amp;quot;(故障-缓慢)硬件现象的存在与影响;这类故障指的是硬件仍在运行, 但其性能严重退化, 未达到应有的标准;&lt;/p&gt;</description>
    </item>
    <item>
      <title>3. Metastable Failures in Distributed Systems</title>
      <link>https://www.whoami-wesleyyou.top/2025/05/22/computer_system_basics/os/OrderLab/3.%20Metastable%20Failures%20in%20Distributed%20Systems/</link>
      <pubDate>Thu, 22 May 2025 21:38:11 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/05/22/computer_system_basics/os/OrderLab/3.%20Metastable%20Failures%20in%20Distributed%20Systems/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;metastable failures 亚稳态故障&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;a failure pattern in distributed systems&lt;/p&gt;
&lt;p&gt;Currently, metastable failures manifest themselves as &lt;em&gt;black swan events(黑天鹅事故)&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;they are &lt;strong&gt;outliers&lt;/strong&gt;(异常事故) because nothing in the past points to their possibility&lt;/li&gt;
&lt;li&gt;have a &lt;strong&gt;severe impact&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;much easier to explain in hindsight(事后) than to predict.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Although instances of metastable failures can &lt;strong&gt;look different at the surface&lt;/strong&gt;, deeper analysis shows that they can be understood within the &lt;strong&gt;same framework&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;By reviewing experiences from a decade of operating &lt;strong&gt;hyperscale distributed systems&lt;/strong&gt;, we identify a class of failures that can &lt;strong&gt;disrupt&lt;/strong&gt; them, even when there are &lt;strong&gt;no hardware failures, configuration errors, or software bugs&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>4. Metastable Failures in the Wild</title>
      <link>https://www.whoami-wesleyyou.top/2025/05/22/computer_system_basics/os/OrderLab/4.%20Metastable%20Failures%20in%20the%20Wild/</link>
      <pubDate>Thu, 22 May 2025 21:33:26 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/05/22/computer_system_basics/os/OrderLab/4.%20Metastable%20Failures%20in%20the%20Wild/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;这篇文章是基于 MetaStable Failures in Distributed Systems 的升级, in the wild 指的是不可控的实际世界&lt;/p&gt;
&lt;p&gt;In this work, we study the prevalence(患病率) of such failures in the wild by scouring(冲刷) over publicly available incident reports from many organizations, ranging from hyperscalers to small companies&lt;/p&gt;
&lt;p&gt;In this paper, we make four contributions that extend the work of Bronson et al. and increase our understanding of metastable failures:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A study of metastable failures in the wild that confirms metastable failures are universally observed and comprise a substantial fraction of the most severe outages (Section 2).&lt;/li&gt;
&lt;li&gt;An improved model that categorizes two types of triggers and two types of amplification mechanisms, which better explains how metastable failures happen (Section 3).&lt;/li&gt;
&lt;li&gt;An insider view at Twitter of a new type of metastable failure where garbage collection acts as an amplification mechanism (Section 4).&lt;/li&gt;
&lt;li&gt;Three example applications on which metastable failures are experimentally reproduced, which helps researchers propose and test solutions to metastable failures (Section 5).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;metastability-in-the-wild&#34;&gt;Metastability in the Wild&lt;/h2&gt;
&lt;p&gt;这一段主要讲了作者对近年来各大小厂的故障并且进行了原因分析和类型总结概括:&lt;/p&gt;</description>
    </item>
    <item>
      <title>2. Predictive and Adaptive Failure Mitigation to Avert Production Cloud VM Interruptions</title>
      <link>https://www.whoami-wesleyyou.top/2025/05/13/computer_system_basics/os/OrderLab/2.%20Predictive%20and%20Adaptive%20Failure%20Mitigation%20to%20Avert%20Production%20Cloud%20VM%20Interruptions/</link>
      <pubDate>Tue, 13 May 2025 16:01:27 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/05/13/computer_system_basics/os/OrderLab/2.%20Predictive%20and%20Adaptive%20Failure%20Mitigation%20to%20Avert%20Production%20Cloud%20VM%20Interruptions/</guid>
      <description>&lt;p&gt;When a failure occurs in production systems, the highest priority is to quickly mitigate(缓解) it.&lt;/p&gt;
&lt;p&gt;Failure Mitigation (FM) is done in a reactive and &lt;strong&gt;ad-hoc way&lt;/strong&gt;, namely taking some &lt;strong&gt;fixed actions&lt;/strong&gt; only after a severe symptom is observed.&lt;/p&gt;
&lt;p&gt;Propose a &lt;strong&gt;preventive&lt;/strong&gt; and &lt;strong&gt;adaptive&lt;/strong&gt; failure mitigation service, &lt;em&gt;&lt;strong&gt;NARYA&lt;/strong&gt;&lt;/em&gt;, that is integraed in a production cloud, Microsoft Azure’s compute platform&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Narya predicts imminent(迫在眉睫的) host failures based on multi-layer system signals&lt;/li&gt;
&lt;li&gt;then decides smart mitigation actions&lt;/li&gt;
&lt;li&gt;&lt;em&gt;goal&lt;/em&gt;: avert(避免) VM failures&lt;/li&gt;
&lt;li&gt;Narya&amp;rsquo;s decision engine takes a novel online experimentation approach to continually explore the best mitigation action.
&lt;ul&gt;
&lt;li&gt;enhances the adaptive decision capability through reinforcement learning.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;key question&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>1. AIOpsLab: A Holistic Framework to Evaluate AI Agents for Enabling Autonomous Clouds</title>
      <link>https://www.whoami-wesleyyou.top/2025/05/12/computer_system_basics/os/OrderLab/1.%20AIOpsLab%20A%20Holistic%20Framework%20to%20Evaluate%20AI%20Agents%20for%20Enabling%20Autonomous%20Clouds/</link>
      <pubDate>Mon, 12 May 2025 22:03:24 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2025/05/12/computer_system_basics/os/OrderLab/1.%20AIOpsLab%20A%20Holistic%20Framework%20to%20Evaluate%20AI%20Agents%20for%20Enabling%20Autonomous%20Clouds/</guid>
      <description>&lt;p&gt;AI for IT Operations (AIOps) aims to automate complex operational tasks, such as fault localization and root cause analysis&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;traditional: ddressing isolated operational tasks&lt;/li&gt;
&lt;li&gt;LLM and AI agents: enabling end-to-end and multitask automation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Target&lt;/strong&gt;&lt;/em&gt;: self-healing cloud systems, a paradigm we term &lt;strong&gt;AgentOps&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;aiopslab&#34;&gt;AIOpsLab&lt;/h2&gt;
&lt;p&gt;a framework that not only deploys micro-service cloud environments, injects faults, generates workloads, and exports telemetry(遥测得的) data but also orchestrates these components and provides interfaces for interacting with and evaluating agents.&lt;/p&gt;
&lt;p&gt;The ultimate goal of &lt;strong&gt;AIOps&lt;/strong&gt;(different from AgentOps) is to create autonomous self-healing clouds, where AI-driven approaches can detect, localize, and mitigate faults with minimal human intervention.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
