Disco: Running Commodity Operating Systems on Scalable Multiprocessors

这篇论文是 VMware 的基石论文 历史背景和硬件 在上世纪 90 年代, 硬件设计已经非常厉害了, 但是多个商业系统跑在一个硬件机器上非常困难, 因此这篇论文设计了一个模式: 在 hardware 和 os 之间添加一个中间层, 类似 于一个 vmm 来进行隔离 这里的硬件背景: Stanford FLASH shared memory multiprocessor experimental cache coherent non-uniform memory architecture (ccNUMA) 传统的不足 硬件的革新需要 significant OS changes OS 本体代码量过大并不适合修改来适配硬件 buggy/incompatible system software can significantly impact the success of such machines commodity OS system software 具有 constraints + inflexibility 的缺点 关键词 scalable: 设计的系统可以适配不同的(未来的)硬件 意味着系统设计能随着处理器数量的增加(几十到几百个 CPU)依然保持良好性能 传统系统只有少量 cpu 并且用一条总线通信, 但是随着 cpu 数量增加, 总线会成为瓶颈 UMA: 统一内存访问, 所有 cpu 访问内存的速度相同, 也就是用上文的总线通信, 随着 cpu 数量增加, 总线压力增大, 性能下降 NUMA: 非统一内存访问, 每个 cpu 有自己的本地内存, 访问本地内存速度快, 访问其他 cpu 的内存速度慢, 这样随着 cpu 数量增加, 性能下降不明显 ccNUMA 的 cc: cache-coherent, 每个 cpu 有自己的缓存, 但是缓存之间需要保持一致性, 这样可以提高性能,但是也增加了复杂度 常见方式是 目录协议 (directory-based coherence), 每个内存块有一个目录记录谁缓存了它, 当有更新时通知或失效这些缓存 flexible: 可以适配不同的 OS (注意 scalable 强调的是硬件的多样性, flexible 强调的是软件的多样性) 系统能支持多样化的使用场景, 工作负载和配置, 而不是只能针对单一情况优化 这里着重强调对 variety of workloads 的支持, 例如 cpu 密集型, io 密集型, 内存密集型等 commodity OS: 现成的, 广泛使用的操作系统, 例如 Linux, Windows, 能应对各种应用场景, 但缺乏针对特定硬件的优化 specialized OS: 针对特定硬件或应用场景优化的操作系统, 例如实时操作系统, 嵌入式系统, 但缺乏通用性 shared memory multiprocessor: 多个处理器可以访问同一块内存 所有处理器访问 同一个全局内存地址空间(不像分布式系统那样各有独立内存); 好处: 编程模型更简单(多个 CPU 看起来就像在同一个大内存上操作); 问题: 容易出现 内存访问冲突 和 一致性问题; FLASH 硬件: 多个节点, 每个节点有 CPU, 内存和 I/O, 通过高速互连组成; 采用目录协议保持缓存一致性, 因此对软件呈现的是一个 共享内存多处理器, 带有 NUMA 特性 VM 方案的缺点 Overheads(性能开销) 需要软件模拟特权指令, 虚拟化 I/O, 带来额外异常处理和执行开销; 每个 VM 都要复制 OS 和应用的代码/数据, 还会重复维护大内存结构(如文件系统 buffer cache), 导致内存浪费; Resource Management (资源管理问题) VMM 缺乏操作系统的高层语义, 只能"盲目"调度; 例如无法区分 idle loop (busy waiting 对 vmm 层透明) 与有效计算, 可能浪费 CPU 时间; 也无法知道某页内存是否已不再使用, 导致内存分配效率低; Communication and Sharing(通信与共享困难) 不同 VM 之间的文件, 磁盘, 应用难以共享; 例如在 VM/370 上, 一个用户的虚拟磁盘若被一个 VM 占用, 另一个 VM 无法访问; 作者观点: 虽然这些缺点依然存在, 但通过结合现代操作系统对分布式环境的支持, 以及 VMM 的新设计技巧, 它们的影响可以大大减轻; ...

2025-09-15 · 9 min · Yuchen You

Mach: A New Kernel Foundation For UNIX Development

Mach System 硬件平台 (Hardware) Mach 最初运行在 DEC VAX 系列机器上, 后来被移植到 IBM RT PC, Sun-3 (68k), Encore Multimax, Sequent Symmetry 等多处理器系统; 这些平台通常配备 数 MB 到数十 MB 的内存 (RAM), 数百 MB 到数 GB 的磁盘存储, 以当时标准算是中高端配置; 通过这些硬件, Mach 展示了良好的可移植性和对对称多处理器 (SMP) 的支持, 并能在有限资源下探索虚拟内存与分布式操作系统的先进机制; ...

2025-09-13 · 2 min · Yuchen You

On μ-Kernel Construction

On $\mu$-Kernel Construction 传统观点是, 微内核是 inefficient 和 not sufficiently flexible 的, 但是本文说明相反观点, 并展示微内核可以达到 macro kernel 的 efficiency 以及为什么当前已有的 measurement 很难说明这一点 设计目标 微内核支持 modular 外部系统可以使用 micro kernel 提供的 mechanism 微内核系统更加 flexible 和 tailorable 明确 target 决定整个 $\mu$-kernel 的能力的不应该是 performance, 而应该是 functionality 也就是说尽量不要把指令放进内核, 除非纯外部执行无法完成指定任务 系统应该能支持 protection independence principle: 不同 sub system 之间不应该有任何互相影响和 corruption 这里的子系统指的是进程, 也就是用户态的资源分割单位 integrity principle: 不同子系统之间应该有 address 联系, 也就是进程能通过地址来互相通信 Address Space 从硬件来看地址空间就是 virtual addr 到 physical addr 的映射, 这是通过 TLB 和 page table 来实现的 ...

2025-09-13 · 5 min · Yuchen You

Exokernel: An Operating System Architecture for Application-Level Resource Management

Exokernel: An Operating System Architecture for Application-Level Resource Management “Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T. Laboratory for Computer Science” (Engler 等, p. 251) (pdf) Motivation 传统的 general OS kernel 只能提供给最广泛的用户态程序一个中庸的最优解,然而随着软件界的发展,越来越需要一种对各种不同的软件有各自 customized 方案的特殊化优化 ...

2025-09-13 · 2 min · Yuchen You

Plan 9 from Bell Labs

Plan 9 System (Bell Lab) 硬件设备 目标环境: 便宜的小型机(办公室个人使用)+ 集中管理的大型服务器(file server, cpu server) 分布式环境设计, 强调网络互联和资源共享 UTF-8 /proc rfork 硬件存储抽象 软件文件系统抽象 包括网络的分布式一致性 创新点 设计目标 maintainence: 分布式的个人 pc 进行 administer 一个系统的开销太大太困难了 也就是通过 centralized administration 来实现集中管理 统一接口: 一切皆文件, 通过 9P 协议访问 每个进程拥有独立的命名空间, 可通过 bind 和 mount 重新组合 支持透明分布式: 远程资源与本地资源无差别 简洁内核, 核心任务是 9P 消息的 multiplex/demultiplex ...

2025-09-13 · 2 min · Yuchen You

The Performance of μ-Kernel-Based Systems

Motivation 和论文目标 守旧派往往认为, 第一代 $\mu$-kernel 微内核具有非常低的 performance/flexibility, 但是本文希望能测试第二代微内核的性能和灵活性, 实验手段是测试一些老的系统性能测试以及加上一些新的有针对的测试 微内核的优点之一是, 内核小巧, 部件坏的概率小 微内核只提供 mechanism 但是不提供 policy, 但是也需要上面一层安全控制的 pager, FS 等资源, 这些往往依赖于 UNIX Server 实现 ...

2025-09-08 · 3 min · Yuchen You

7. Gray Failure the Achilles' Heel of Cloud-Scale Systems

Introduction 这篇文章系统性地提出并定义了云计算系统中的"灰色故障"(Gray Failure)问题, 认为它是当前云基础设施高可用性的一大障碍 gray failure component failures whose manifestations are fairly subtle and thus defy quick and definitive detection 系统某部分发生了轻微但持续的问题, 这些问题不易被传统故障检测机制发现, 但已经影响了应用层的性能和可用性;它不同于"失败即停" (fail-stop) 故障, 后者更易被监测和处理 ...

2025-06-01 · 2 min · Yuchen You

6. Fail Stutter Fault Tolerance

Introduction 背景问题缺陷 Byzantine 模型假设组件可能出现任意错误甚至恶意行为, 过于复杂难以实施; Fail-stop 模型假设组件要么正常工作, 要么完全停止, 虽然简单易用, 但忽视了现代硬件中常见的"性能故障"; 本文特点 Fail-Stutter 模型: a realistic and yet tractable fault model that accounts for both absolute failure and a new range of performance failures common in modern components. ...

2025-05-31 · 6 min · Yuchen You

5. Fail-Slow at Scale

Introduction 这篇论文 Fail-Slow at Scale: Evidence of Hardware Performance Faults in Large Production Systems 由Haryadi S. Gunawi等人发表在第16届USENIX文件与存储技术会议(FAST 2018)上 系统性地揭示了在大规模生产系统中"fail-slow"(故障-缓慢)硬件现象的存在与影响;这类故障指的是硬件仍在运行, 但其性能严重退化, 未达到应有的标准; ...

2025-05-27 · 13 min · Yuchen You

3. Metastable Failures in Distributed Systems

Introduction metastable failures 亚稳态故障 a failure pattern in distributed systems Currently, metastable failures manifest themselves as black swan events(黑天鹅事故) they are outliers(异常事故) because nothing in the past points to their possibility have a severe impact much easier to explain in hindsight(事后) than to predict. Although instances of metastable failures can look different at the surface, deeper analysis shows that they can be understood within the same framework. By reviewing experiences from a decade of operating hyperscale distributed systems, we identify a class of failures that can disrupt them, even when there are no hardware failures, configuration errors, or software bugs. ...

2025-05-22 · 4 min · Yuchen You

4. Metastable Failures in the Wild

Introduction 这篇文章是基于 MetaStable Failures in Distributed Systems 的升级, in the wild 指的是不可控的实际世界 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 In this paper, we make four contributions that extend the work of Bronson et al. and increase our understanding of metastable failures: 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). An improved model that categorizes two types of triggers and two types of amplification mechanisms, which better explains how metastable failures happen (Section 3). An insider view at Twitter of a new type of metastable failure where garbage collection acts as an amplification mechanism (Section 4). Three example applications on which metastable failures are experimentally reproduced, which helps researchers propose and test solutions to metastable failures (Section 5). Metastability in the Wild 这一段主要讲了作者对近年来各大小厂的故障并且进行了原因分析和类型总结概括: ...

2025-05-22 · 5 min · Yuchen You

2. Predictive and Adaptive Failure Mitigation to Avert Production Cloud VM Interruptions

When a failure occurs in production systems, the highest priority is to quickly mitigate(缓解) it. Failure Mitigation (FM) is done in a reactive and ad-hoc way, namely taking some fixed actions only after a severe symptom is observed. Propose a preventive and adaptive failure mitigation service, NARYA, that is integraed in a production cloud, Microsoft Azure’s compute platform Narya predicts imminent(迫在眉睫的) host failures based on multi-layer system signals then decides smart mitigation actions goal: avert(避免) VM failures Narya’s decision engine takes a novel online experimentation approach to continually explore the best mitigation action. enhances the adaptive decision capability through reinforcement learning. Introduction key question ...

2025-05-13 · 6 min · Yuchen You