目录
正在加载目录…
正在阅读专栏 分布式共识系统专栏 第 46 篇 · 共 59 篇 · 78%

论文:Implementing Fault-Tolerant Services Using the State Machine Approach

发布于 2026-09-21 10:08 · 最后编辑于 2026-09-21 18:15 · 版本 v2 · 字数 47,615 · 预计阅读 96 分钟 👁 23 次阅读

本篇整理 Fred B. Schneider 的《Implementing Fault-Tolerant Services Using the State Machine Approach: A Tutorial》。每一页保留 Cornell 官方 PDF 的原始页面图;页面图是原文排版、Figure、伪代码、公式、脚注和 References 的原始副本,下面按 PDF 页序给出完整中文译文。state machine、Agreement、Order、stability、Byzantine、fail-stop、request identifier 等术语按语境保留 English 或中英并列。

论文:Implementing Fault-Tolerant Services Using the State Machine Approach

相关文章:论文:Raft 可理解的共识算法(扩展版) · 论文:Paxos Made Simple · 论文:Practical Byzantine Fault Tolerance(PBFT) · 论文:Viewstamped Replication Revisited

TL;DR

  • 抽象:把 fault-tolerant service 表达成 deterministic state machine;只要所有 nonfaulty replica 从同一 state 开始并按同一顺序执行同一 request sequence,就会产生相同 output。
  • Replica Coordination:将问题拆成 Agreement(每个 nonfaulty replica 收到每个 request)与 Order(所有 replica 按相同 relative order 处理 request),再用 stability test 决定何时可以安全执行 request。
  • failure model:Byzantine failure 通常需要 2t + 1 个 replica 加 majority output;fail-stop failure 只需 t + 1 个 replica。
  • 顺序来源:可以使用 logical clock、synchronized real-time clock,或由 replica 协商生成 unique identifier;不同 identifier 方案对应不同 stability 条件和通信成本。
  • 系统边界:不仅 replica 可能 failure,output device、client 和 configuration manager 也可能 failure;论文因此进一步讨论 output voting、client replication、defensive programming、time-triggered request 与 dynamic reconfiguration。

名词解释

名词含义本文译法
state machine由 state variables 和 deterministic commands 定义的服务抽象state machine;状态机
replica coordination协调 replica 接收、排序和处理 requestReplica Coordination
Agreement每个 nonfaulty replica 都收到每个 requestAgreement
Order各 replica 按相同 relative order 处理 requestOrder
stabilityrequest 不会再有更小 identifier 的 request 到达,可以执行stability;稳定
Byzantine failure组件可任意、恶意地偏离 specificationByzantine failure
fail-stop failure组件进入可被检测的停止状态fail-stop failure
output device执行 state machine output 的 actuator、disk、terminal 等设备output device
configurator监测 component failure/repair 并请求修改 configuration 的 clientconfigurator

目录

章节内容
版本与来源Cornell 官方 PDF、版本信息和翻译边界
原文页面与逐页翻译21 个 PDF 页面按原页保留并翻译
机制索引state machine、Agreement/Order、stability 与 reconfiguration
本篇验收页数、页面尺寸、Figure、协议和 References 覆盖范围

版本与来源

  • 论文标题:Implementing Fault-Tolerant Services Using the State Machine Approach: A Tutorial。
  • 作者与机构:Fred B. Schneider;Department of Computer Science, Cornell University, Ithaca, New York 14853。
  • 发表信息:ACM Computing Surveys 22(4),1990 年 12 月,pp. 299–319;Cornell 页面同时提供作者保留的早期 Technical Report 版本。
  • 官方来源:Cornell 作者页面;Cornell 官方 PDF:SMSurvey.pdf;ACM DOI 页面。
  • 本地固定文件:source/state-machine-approach-schneider.pdf。
  • PDF 固定信息:21 页;页面尺寸因扫描/排版略有差异,首尾页面约 477×704 points;SHA-256:2a018ab1134a7064815f89f246f36e17478fd65400a7939d2468d8a1cf6cd46a。
  • 附件处理:每页按原始 page rectangle 以 2× 渲染,页面 PNG 保留原始比例与每页差异,存放于 assets/45 State Machine Approach/;正文以 600 宽度嵌入。Figure 1–4、伪代码、公式、脚注与 References 通过原始页面图保留。
  • 翻译边界:逐页覆盖 Abstract、正文、protocol、Figure caption、脚注、Acknowledgments 和完整 References;state machine、Agreement、Order、stability、Byzantine、fail-stop 等术语不强行翻译成不符合惯例的中文。

原文页面与逐页翻译

第 1 页:Abstract 与 Introduction 开始

state machine approach p01

使用 State Machine Approach 实现 Fault-Tolerant Services:教程

作者:Fred B. Schneider。

机构:Department of Computer Science,Cornell University,Ithaca,New York 14853。

Abstract

state machine approach 是一种在 distributed system 中实现 fault-tolerant service 的通用方法。本文回顾这一 approach,并描述适用于两种不同 failure model 的 protocol:Byzantine 和 fail-stop。本文还讨论用于移除 faulty component、集成 repaired component 的 system reconfiguration technique。

分类与主题词:C.2.4「Computer-Communication Networks:Distributed Systems—network operating systems」;D.2.10「Software Engineering:Design—methodologies」;D.4.5「Operating Systems:Reliability—fault tolerance」;D.4.7「Operating Systems:Organization and Design—interactive systems, real-time systems」。

General Terms:Algorithms、Design、Reliability。

Additional Key Words and Phrases:Client-server、distributed services、state machine approach。

INTRODUCTION

distributed software 通常按 client 和 service 组织。每个 service 由一个或多个 server 构成,并导出 client 通过 request 调用的 operation。

使用单个 centralized server 是实现 service 最简单的方式,但这样得到的 service 的 fault tolerance 只能达到运行该 server 的 processor 所能提供的程度。如果这个程度的 fault tolerance 不可接受,就必须使用能够独立 failure 的多个 server。

通常,单个 server 的 replica 在 distributed system 的不同 processor 上运行,并通过 protocol 协调 client 与这些 replica 的 interaction。distributed system 中 processor 的 physical 和 electrical isolation 保证 server failure 是 independent 的,这是所需的条件。

state machine approach 是一种通过复制 server、协调 client 与 server replica 的 interaction 来实现 fault-tolerant service 的通用方法。该 approach 还为理解和设计 replication-management protocol 提供 framework。

许多涉及 data 或 software replication 的 protocol——无论复制是为了 mask failure,还是为了在没有 centralized control 时促进 cooperation——都可以使用 state machine approach 推导出来。虽然这些 protocol 中很少真正以这种方式得到,但用 state machine 的方式观察它们,有助于理解它们为什么工作、如何工作。

本文是一篇关于 state machine approach 的 tutorial。它描述该 approach,以及它在两种代表性 environment 中的 implementation。小例子足以说明要点;不过,这一 approach 已成功应用于更大的 example,Section 8 会提到其中一些。

Section 1 描述如何用 state machine、client 和 output device 来看待 system。Sections 2–5 讨论如何应对 failure。Section 6 讨论基于 time 的一类重要 optimization。Section 7 描述 dynamic reconfiguration。Section 8 讨论该 approach 的历史与 related work。

脚注:术语“state machine”并不理想,但 literature 一直使用这个名称。

版权说明译注:原页面保留 ACM 的复制许可文字:只要不是为了直接商业利益,可以免费复制全部或部分材料,但必须保留 ACM copyright notice、标题和日期,并注明复制获得 Association for Computing Machinery 许可;其他复制或重新发表需要付费和/或具体许可。

第 2 页:目录与 State Machines

state machine approach p02

CONTENTS

  • INTRODUCTION
    1. STATE MACHINES
    1. FAULT TOLERANCE
    1. FAULT-TOLERANT STATE MACHINES
    • 3.1 Agreement
    • 3.2 Order and Stability
    1. TOLERATING FAULTY OUTPUT DEVICES
    • 4.1 Outputs Used Outside the System
    • 4.2 Outputs Used Inside the System
    1. TOLERATING FAULTY CLIENTS
    • 5.1 Replicating the Client
    • 5.2 Defensive Programming
    1. USING TIME TO MAKE REQUESTS
    1. RECONFIGURATION
    • 7.1 Managing the Configuration
    • 7.2 Integrating a Repaired Object
    1. RELATED WORK
  • ACKNOWLEDGMENTS
  • REFERENCES

1. STATE MACHINES

service、server,以及大多数支持 modularity 的 programming-language structure,都可以定义 state machine。

state machine 由 state variables 和 commands 构成。state variables encode state;commands transform state。每个 command 由 deterministic program 实现;相对于其他 command,command execution 是 atomic 的,并且会修改 state variables 和/或产生 output。

state machine 的 client 请求执行一个 command。request 指定一个 state machine、要执行的 command,以及该 command 所需的 information。

request processing 的 output 可以发给 actuator(例如 process-control system)、某个 peripheral device(例如 disk 或 terminal),或者等待此前 request response 的 client。

在本 tutorial 中,我们只通过列出 state variables 和 commands 来描述 state machine。Figure 1 的 state machine memory 实现一个从 location 到 value 的 time-varying mapping。read command 允许 client 获得 location 当前关联的 value;write command 把一个新 value 与 location 关联。

为了保持 generality,本文刻意不指定 command invocation 如何实现。command 可以使用下列方式之一实现:

  • 使用共享 data、通过 call 调用的 procedure 集合,例如 monitor;
  • 使用等待包含 request 的 message、并执行 message 指定 action 的单个 process,例如 server;
  • 使用 interrupt handler 集合;此时 request 通过触发 interrupt 发出,例如 operating-system kernel。禁止 interrupt 可以让每个 command 在下一个 command 开始前执行完成。

Figure 2 的 state machine mutex 实现一个 resource allocator,保证任意时刻最多有一个 client 获得某个 resource 的 access。其中 x ◦ y 表示把 y append 到 list x 尾部;head(x) 表示 list x 的第一个 element;tail(x) 表示删除 list x 第一个 element 后得到的 list。这样的 state machine 可能会实现为 operating-system kernel 的 supervisor-call handler 的一部分。

state machine 一次处理一个 request,并按与 potential causality 一致的 order 处理。因此,state machine client 可以对 request 的处理 order 作如下假设:

  • O1:单个 client 向给定 state machine sm 发出的 request,sm 按 request issued 的顺序处理。
  • O2:如果 client c 向 sm 发出的 request r 这一事实可能导致 client c′ 向 sm 发出 request r′,那么 sm 先处理 r,再处理 r′。

由于 communication network delay,O1 和 O2 并不意味着 state machine 会按 request made 的顺序或 request received 的顺序处理 request。

第 3 页:State Machine 示例、语义特征与 Fault Tolerance

state machine approach p03

Figure 1:memory。

text
memory: state-machine
var store: array[0 .. n] of word

read: command(loc: 0 .. n)
    send store[loc] to client
end read

write: command(loc: 0 .. n, value: word)
    store[loc] := value
end write
end memory

Figure 2:resource allocator。

text
mutex: state-machine
var user: client-id
    init ∅;
    waiting: list of client-id
    init ∅;

acquire: command
    if user = ∅ → send OK to client;
                  user := client
    [] user ≠ ∅ → waiting := waiting ◦ client
    fi
end acquire

release: command
    if waiting = ∅ → user := ∅
    [] waiting ≠ ∅ → send OK to head(waiting);
                      user := head(waiting);
                      waiting := tail(waiting)
    fi
end release
end mutex

为了不依赖用于传输 request 的 interprocess-communication mechanism,本文把 client request 写成 tuple:

text
(state-machine.command, arguments)

并假设 request processing 的任何 result 都通过 message 返回。例如,client 可以执行:

text
(memory.write, 100, 16.2);
(memory.read, 100);
receive v from memory

这些 action 将 location 100 的 value 设置为 16.2,请求 location 100 的 value,并等待该 value;收到后把它设置给 v。

state machine 的 defining characteristic 不是 syntax,而是:它规定一个 deterministic computation,读取 request stream、逐个处理 request,并偶尔产生 output。

State Machine 的语义特征:state machine 的 output 完全由它处理的 request sequence 决定,与 time 和 system 中的其他 activity 无关。

并不是所有 command collection 都满足这个特征。考虑下面的 program,它解决一个简单的 process-control problem:根据 sensor value 反复调整 actuator。client 周期性读取 sensor,把读取到的 value 发送给 state machine pc,然后大约 delay D 秒:

text
monitor: process
    do true → val := sensor;
              (pc.adjust, val);
              delay D
    od
end monitor

state machine pc 根据保存在 state variable q 中的 past adjustment、sensor reading 和 control function F 调整 actuator:

text
pc: state-machine
var q: real;

adjust: command(sensor-val: real)
    q := F(q, sensor-val);
    send q to actuator
end adjust
end pc

如果 sensor value 随 time 变化,那么把 pc 写成一个单独 command——循环读取 sensor、计算 F 并写入 actuator——虽然很有吸引力,但结果不满足上面的 semantic characterization,因此不是 state machine。

第 4 页:Fault Tolerance 定义与 Fault-Tolerant State Machine 开始

state machine approach p04

这是因为发送给 actuator 的 value(state machine 的 output)不仅依赖发送给 state machine 的 request,还依赖 loop 的 execution speed。上面采用的结构把 loop 放入 monitor,避免了这个问题。

实际上,必须按 state machine 和 client 组织 system 并不是实质限制。任何可以用 procedure 和 procedure call 组织的内容,也可以使用 state machine 和 client 组织:state machine 实现 procedure,request 实现 procedure call。

事实上,state machine 比通常的 procedure call 提供更大结构灵活性:client 发出的 request 不必一直阻塞到 request 被处理,request 的 output 也可以发送给发出 request 的 client 之外的其他位置。我们还没有遇到过无法干净地用 state machine 和 client 编程的 application。

2. FAULT TOLERANCE

在讨论 fault-tolerant state machine 的 implementation 前,需要引入一些关于 failure 的 terminology。

当 component 的 behavior 不再符合其 specification 时,称 component faulty。本文考虑两类代表性 faulty behavior:

Byzantine Failure:component 可以表现出任意、恶意的 behavior,可能与其他 faulty component 合谋 [Lamport et al. 1982]。Byzantine failure 是关于 failure effect 能作出的最弱假设。基于 faulty component behavior assumptions 设计 system 有一个风险:如果 assumptions 不满足,system 可能 failure。因此,life-critical system 最好能够容忍 Byzantine failure。不过,对大多数 application,假设 fail-stop failure 就够了。

如果一个 system 由一组 distinct component 构成,并且在关注的某个 interval 内不超过 t 个 component 变为 faulty 时,system 仍满足 specification,则称该 system 是 t fault tolerant。

传统上,fault tolerance 用 mean time between failures(MTBF)、给定 interval 内 failure probability 等 statistical measure 规定。虽然这些 characterization 对 system user 很重要,但用某个 interval 内最多可容忍的 component failure 数量描述 fault tolerance 也有优势。

声明 system 是 t fault tolerant,会明确给出正确运行所需的 assumptions;MTBF 等 statistical measure 则不会。并且,t fault tolerance 与构成 system 的 component reliability 无关,所以它衡量的是 system architecture 提供的 fault tolerance,而不是单纯使用 reliable component 得到的 fault tolerance。

t fault-tolerant system 的 MTBF 和其他 statistical reliability measure,可以从用于构造 system 的 component 的 statistical reliability measure 推导出来,特别是关注 operating interval 内发生 t 个或更多 failure 的 probability。因此,t 通常根据 component reliability 的 statistical measure 选择。

Fail-stop Failure:component failure 后进入一种允许其他 component 检测 failure 的 state,然后停止工作 [Schneider 1984]。

虽然 Byzantine failure 可能最具破坏性,并有 anecdotal evidence 表明实践中确实会发生,但这里先转向实现 fault-tolerant state machine。

脚注:t fault-tolerant system 在发生超过 t 个 failure 后可能仍继续正确运行,但不能保证正确运行。

第 5 页:Replica Coordination、Agreement 与 Order

state machine approach p05

3. FAULT-TOLERANT STATE MACHINES

实现 t fault-tolerant state machine 的方法,是复制 state machine,并在 distributed system 的每个 processor 上运行一个 replica。

只要每个由 nonfaulty processor 运行的 replica 都从相同 initial state 开始,并按相同 order 执行相同 request,那么每个 replica 都会做相同事情并产生相同 output。因此,如果假设每个 failure 最多影响一个 processor,也就是一个 state-machine replica,那么通过组合这个 ensemble 中 state-machine replica 的 output,就可以获得 t fault-tolerant state machine 的 output。

如果 processor 可能发生 Byzantine failure,t fault-tolerant state machine 的 ensemble 至少需要 2t + 1 个 replica;ensemble output 是 replica majority 产生的 output。这是因为有 2t + 1 个 replica 时,即使有 t 个 failure,output majority 仍然正确。

如果 processor 只会发生 fail-stop failure,则包含 t + 1 个 replica 的 ensemble 就足够,而且 ensemble output 可以是任意成员产生的 output。这是因为 fail-stop processor 只产生正确 output,并且在 t 个 failure 后,t + 1 个 replica 中至少还剩一个 nonfaulty replica。

因此,实现 t fault-tolerant state machine 的关键是保证:

Replica Coordination

所有 replica 收到并处理相同的 request sequence。

这可以分解成两个关于向 ensemble 中的 replica disseminate request 的要求:

  • Agreement:每个 nonfaulty state-machine replica 都收到每个 request。
  • Order:每个 nonfaulty state-machine replica 按相同 relative order 处理它收到的 request。

注意,Agreement 规定 client 与 state-machine replica interaction 时的 behavior;Order 规定 state-machine replica 相对于来自不同 client 的 request 的 behavior。因此,虽然 Replica Coordination 也可以采用其他划分方式,但 Agreement/Order 划分很自然,因为它对应 client 与 state-machine replica 之间已有的 separation。

Agreement 和 Order 的 implementation 分别在 Sections 3.1 和 3.2 讨论。这些 implementation 不对 client 或 command 作任何 assumptions。general­ity 很有用,但了解 command 的语义后,可以 weaken Replica Coordination,从而使用更便宜的 replica-management protocol。

两个常见的 weakening 如下。

第一,在假设 processor fail-stop 时,可以对 read-only request 放宽 Agreement。fail-stop 情况下,一个不修改 state variable 的 request r 只需发送给一个 nonfaulty state-machine replica。因为该 replica 返回的 response 按定义是正确的,而且 r 不改变 state variable,所以处理 r 的 replica state 会继续与未处理它的 replica state 相同。

第二,可以对 commute 的 request 放宽 Order。如果在 state machine sm 中,先处理 r 再处理 r′ 所产生的 output sequence 和 final state,与先处理 r′ 再处理 r 相同,则称 request r 和 r′ commute。

Figure 3 给出可以放宽 Order 的 state machine example。state machine tally 从 alternatives 中选出获得至少 MAJ vote 的 alternative,并把选择发送给 SYSTEM。如果 client 不能投票超过一次,且 client 数量 Cno 满足 2MAJ > Cno,那么任何 request 都与其他 request commute。因此无需实现 Order,即使不同 state-machine replica 以不同 order 处理 request,也会产生相同 output。

反之,如果 client 可以投票多次,或 2MAJ ≤ Cno,reorder request 可能改变 election result。

Aizikowitz [1989] 以及 Mancini 和 Pappalardo [1988] 提出了不满足 Replica Coordination 的 state-machine ensemble theory。两个 theory 都基于证明:ensemble 实现的 specification 与 single replica 实现的 specification 相同。Aizikowitz [1989] 使用 temporal logic 描述 state sequence;Mancini 和 Pappalardo [1988] 使用 action-sequence algebra。详细描述超出本 tutorial 范围。

第 6 页:Agreement、Order 和 Stability

state machine approach p06

Figure 3:Election。

text
tally: state-machine
var votes: array[candidate] of integer
    init 0

cast-vote: command(choice: candidate)
    votes[choice] := votes[choice] + 1;
    if votes[choice] ≥ MAJ → send choice to SYSTEM;
                           halt
    [] votes[choice] < MAJ → skip
    fi
end cast-vote
end tally

3.1 Agreement

Agreement requirement 可以通过使用任意一种 protocol 满足:该 protocol 允许一个 designated processor(称为 transmitter)向其他 processor disseminate value,并保证:

  • IC1:所有 nonfaulty processor 对同一个 value 达成一致;
  • IC2:如果 transmitter nonfaulty,则所有 nonfaulty processor 使用 transmitter 的 value 作为达成一致的 value。

建立 IC1 和 IC2 的 protocol 在 literature 中受到大量研究,有时称为 Byzantine Agreement protocol、reliable broadcast protocol,或简称 agreement protocol。设计此类 protocol 的难点,是应对 transmitter 在 execution 中途 failure。

Strong 和 Dolev [1983] 给出了能够容忍 Byzantine processor failure 的 protocol;Schneider 等人 [1984] 给出了只能容忍 fail-stop processor failure、但成本显著更低的 protocol。

如果使用一个满足 IC1 和 IC2 的 protocol,把 request disseminate 给所有 state-machine replica,那么 Agreement requirement 就满足了。transmitter 可以是 client 本身;也可以由 client 把 request 发给一个 state-machine replica,让该 replica 作为 transmitter。

当 client 不亲自作为 transmitter 时,它必须确保 transmitter 在 request disseminate 给 state-machine replica 前不会丢失或破坏 request。一种监测这类 corruption 的方法,是让 client 成为接收 transmitter 发出 request 的 processor 之一。

3.2 Order and Stability

Order requirement 可以通过以下方法满足:给 request 分配 unique identifier,并让 state-machine replica 按这些 unique identifier 的 total ordering relation 处理 request。

这等价于如下要求。定义 request 在 sm_i 上 stable:没有来自 correct client、且带有更小 unique identifier 的 request 可以随后交付给 state-machine replica sm_i。

Order Implementation:replica 下一步处理 stable request 中 unique identifier 最小的 request。

要进一步 refine Order Implementation,需要选择分配 unique identifier 的方法,并为该 assignment method 设计 stability test。注意,任意 unique identifier assignment method 都受到 Section 1 的 O1、O2 约束:如果 request r_i 可能导致 request r_j 被发出,则必须有 uid(r_i) < uid(r_j),其中 uid(r) 是 request r 被分配的 unique identifier。

下面给出 Order Implementation 的三种 refinement。前两种使用 clock,第三种使用 ensemble replica 定义的 ordering。

3.2.1 Using Logical Clocks

logical clock [Lamport 1978a] 是一个从 event 映射到 integer 的 mapping T。对任意两个 distinct event e 和 e′,要么 T(e) < T(e′),要么 T(e) > T(e′);如果 e 可能导致 e′,则 T(e) < T(e′)。

第 7 页:Logical Clock、FIFO Channel 与 Stability Test

state machine approach p07

在 distributed system 中实现 logical clock 很简单。每个 process p 关联一个 counter T_p;p 发送的每条 message 都包含 timestamp,即发送时 T_p 的 value。T_p 按下列方式更新:

  • LC1:p 每发生一次 event 后递增 T_p。
  • LC2:收到带 timestamp T_q 的 message 后,process p 执行:
text
T_p := max(T_p, T_q) + 1

processor p 上发生的 event e 的 T(e),通过在 event 发生时的 T_p value 后附加一个唯一标识 p 的 fixed-length bit string 得到。

Figure 4 展示一个由三个 processor p、q、r 构成的 system 中使用 logical clock。event 用 dot 表示;如果 event e 可能导致 event e′,就在两者之间画 arrow。例如,不同 process 间的 arrow 从发送 message 的 event 指向收到 message 的 event。每个 event 上方写着其 T_p(e) value。

如果使用 T(e) 作为与 request issuance 对应的 event 的 unique identifier,就会得到满足 O1、O2 的 total ordering。因此,只要能制定方法判断 request 在 state-machine replica 上何时 stable,logical clock 就可以作为 Order Implementation 的基础。

如果 Byzantine failure 可能发生,且 process 或 message 可以任意长时间延迟而不被视为 faulty,那么实现 stability test 没有意义。原因是,在这种条件下,没有 deterministic protocol 能实现 Agreement [Fischer et al. 1985]。既然 Agreement 不可能满足,就没有必要满足 Order requirement。

processor 和 message 的 relative speed 有 bound 的情况,等价于假设 nonfaulty processor 有 synchronized real-time clock,稍后讨论。因此,现在考虑 fail-stop failure 可能发生,且 process 或 message 可以任意延迟而不被视为 faulty 的情况。

通过给每一对 processor 间的 message 加 sequence number,可以很容易保证:

FIFO Channels:一对 processor 之间的 message 按发送顺序交付。

对于 fail-stop processor,还可以作如下假设:

Failure Detection Assumption:processor p 只有在收到 fail-stop processor q 发送的最后一条 message 后,才检测到 q failure。

这个 assumption 与 FIFO Channels 一致,因为 fail-stop processor 的 failure event 必然发生在它发送最后一条 message 之后;因此最后一条 message 应在其他 message 之后收到。

在这两个 assumption 下,可以使用如下 stability test:

Logical Clock Stability Test Tolerating Fail-stop Failures:每个 client 周期性地向 state machine 发出某个 request(该 request 可以是 null request)。如果运行在 nonfaulty processor 上的每个 client 都已经向 replica sm_i 发送了 timestamp 更大的 request,则某个 request 在 sm_i 上 stable。

第 8 页:Logical Clock Stability Proof 与 Real-Time Clock 开始

state machine approach p08

要理解该 stability test 为什么工作,证明一旦 request r 在 sm_i 上 stable,就不会再收到 unique identifier 更小的 request。

首先考虑 sm_i 没有检测为 faulty 的 client。由于使用 logical clock 生成 unique identifier,client c 发出的任何 request 都会有一个比 c 之前发出的 request 更大的 unique identifier。根据 FIFO Channels,一旦 sm_i 收到 nonfaulty client c 的 request,就不可能再收到来自 c、且比 uid(r) 更小的 request。

因此,一旦从每个 nonfaulty client 收到比 uid(r) 更大的 request,就不可能再从这些 client 收到比 uid(r) 更小的 request。

再考虑 sm_i 检测为 faulty 的 client c。Failure Detection Assumption 意味着 sm_i 不会收到来自 c 的 request。因此,一旦 request r 在 sm_i 上 stable,就不会再从 faulty 或 nonfaulty client 收到 timestamp 小于 r 的 request。

3.2.2 Synchronized Real-Time Clocks

产生满足 O1、O2 的 unique request identifier 的第二种方法,是使用 approximately synchronized real-time clock。

定义 T_p(e) 为 processor p 的 real-time clock 在 event e 发生时的 value。使用这种方式生成 identifier,需要两个限制。

O1 成立的前提是:client 不能在 successive clock tick 之间发出两个或更多 request。因此,如果 processor clock 的 resolution 是 R 秒,则每个 client 每 R 秒最多发出一个 request。

O2 成立的前提是:clock synchronization 程度优于 minimum message-delivery time。特别地,如果不同 processor 的 clock synchronization 误差在 δ 秒以内,那么一条 client message 到达另一 client 所需时间必须超过 δ 秒。否则,较早发出的 request 可能得到比后发 request 更小的 identifier,从而违反 O2。

当 unique request identifier 来自 synchronized real-time clock 时,可以利用 clock 和 message-delivery delay bounds 实现 stability test。令 A 为常数,使得具有 uid(r) 的 request r,按照 receiving processor 的 local clock,最晚在 uid(r) + A 时被每个 correct processor 收到。

如果 request 是通过采用 fixed number of round 的 dissemination protocol 发送,那么只要该 protocol 能建立 IC1、IC2,这样的 A 必然存在。

根据定义,当 processor p 的 clock 到达 T 时,p 之后不可能收到 uid(r) < T − A 的 request。因此,可以得到 real-time clock stability test。

脚注:若 Byzantine failure 可能发生,已有多种 protocol 可实现 clock synchronization [Halpern et al. 1984; Lamport and Melliar-Smith 1984]。Schneider [1986] 提供 survey。这些 protocol 都要求 nonfaulty processor 的 execution speed、clock rate 和 nonfaulty communication link 的 message-delivery delay 存在已知 bounds。实际中这并不构成限制;clock synchronization 的精度与 message-delivery delay 的 variance 成比例,因此可以满足 message delay 大于 clock synchronization error 的要求。

脚注:一般来说,A 是 message-delivery delay variance、maximum message-delivery delay 和 clock synchronization 程度的 function。Cristian 等人 [1985] 给出不同 environment 下 A 的详细推导。

第 9 页:Real-Time Stability、Replica-Generated Identifier

state machine approach p09

Real-Time Clock Stability Test Tolerating Byzantine Failures I:如果 state-machine replica sm_i 的 local clock 读数为 T,且 uid(r) < T − A,则 request r 在 sm_i 上 stable。

该 stability test 的一个 disadvantage 是:它迫使 state machine 落后 client A 的时间,而 A 与 worst-case message-delivery delay 成比例。

这个 disadvantage 可以避免。根据 request identifier total ordering 的 O1,如果 communication channel 满足 FIFO Channels,那么收到 client c 的 request r 后,state-machine replica 只可能随后从 c 收到 unique identifier 大于 uid(r) 的 request。

因此,只要从每个 client 收到一个更大 unique identifier 的 request,r 在 state-machine replica 上也 stable。

Real-Time Clock Stability Test Tolerating Byzantine Failures II:如果每个 client 都已经向 state-machine replica sm_i 发出了一个 unique identifier 更大的 request,则 request r 在 sm_i 上 stable。

如果某个 faulty processor 拒绝发出 request,第二个 test 永远不会通过。但可以组合两个 test:当 request 满足任意一个 test 时就视为 stable。这样,只有 faulty processor 或 network delay 强迫 system 时,stability test 才会落后 client A。Gopal 等人 [1990] 讨论了这种 combined test。

3.2.3 Using Replica-Generated Identifiers

在前面两个 Order Implementation refinement 中,由 client 决定 request processing order:request r 的 uid(r) 由发出该 request 的 client 分配。

下面的 refinement 由 state-machine replica 决定 order。unique identifier 分两个 phase 计算。第一 phase 中,state-machine replica 为 request 提议 candidate unique identifier;这一 phase 可以作为满足 Agreement requirement 的 agreement protocol 一部分。第二 phase 选择其中一个 candidate,作为该 request 的 unique identifier。

这种计算 unique identifier 的方法的优点是:不需要 system 中所有 processor 之间通信。使用 logical clock 或 synchronized real-time clock 生成 unique request identifier 时,所有运行 client 或 state-machine replica 的 processor 都必须通信。

logical clock 的情形中,为了让 request stable,需要 communication;synchronized real-time clock 的情形中,为保持 clock synchronization,需要 communication。replica-generated identifier approach 只需要运行 client 和 state-machine replica 的 processor 之间通信。

通过限制 phase 1 中为 request 提出的 candidate,便可以得到简单 stability test。先定义 terminology:当 sm_i 收到 request r 并为它提出 candidate unique identifier 时,称 sm_i seen request r;当 replica 知道 request 的 ultimate choice of unique identifier 时,称 sm_i accepted request r。

定义 cuid(sm_i, r) 为 replica sm_i 为 request r 提议的 candidate unique identifier。下列两个 constraint 可以导出简单 stability test:

text
UID1: cuid(sm_i, r) ≤ uid(r)

UID2: 如果 request r′ 在 r 被 sm_i accepted 后被 sm_i seen,
      则 uid(r) < cuid(sm_i, r′)。

如果 execution 中始终满足这些 constraint,可以使用:

Replica-Generated Identifiers Stability Test:已被 sm_i accepted 的 request r,只要不存在 request r′ 同时满足(i)已经被 sm_i seen;(ii)尚未被 sm_i accepted;(iii)cuid(sm_i, r′) ≤ uid(r),就 stable。

第 10 页:Replica-Generated Identifier Protocol

state machine approach p10

要证明这个 stability test 有效,必须说明:一旦 accepted request r 在 sm_i 上被判定为 stable,就不会再有更小 unique identifier 的 request 在 sm_i 上 accepted。

设 request r 根据 Replica-Generated Identifiers Stability Test 在 replica sm_i 上 stable。根据 UID2,任意尚未被 sm_i seen 的 request r′ 都满足 uid(r) < cuid(sm_i, r′)。再由 UID1 和 transitivity 得到 uid(r) < uid(r′),所以 r′ 不可能有比 r 更小的 unique identifier。

再考虑 r′ 已被 seen 但尚未 accepted 的情况。由于 r 的 stability test 成立,有 uid(r) < cuid(sm_i, r′);根据 UID1 得到 uid(r) < uid(r′),因此 r′ 也不可能有比 r 更小的 unique identifier。

所以,一旦 request r 满足 Replica-Generated Identifiers Stability Test,之后在 sm_i 上 accepted 的任意 request r′ 都满足 uid(r) < uid(r′),结论成立。

与 clock-generated unique identifier 不同,replica-generated identifier 不一定满足 Section 1 的 O1 和 O2。若没有进一步 restriction,client 可以发出 request r,向另一个 client 发送 message 使其发出 r′,但仍可能有 uid(r′) < uid(r)。

但只要 client 开始向 state-machine replica disseminate request 后,在所有 state-machine replica 都 accepted 该 request 前不进行其他 communication,O1 和 O2 就成立。假设 request r 影响了 request r′,这个 delay 保证 r 先被每个 state-machine replica sm_j accepted,再被 r′ seen。根据 UID2,有 uid(r) < cuid(sm_i, r′);再根据 UID1 和 transitivity,有 uid(r) < uid(r′),满足要求。

为了完成 Order Implementation,只需设计 protocol 计算 unique identifier 和 candidate unique identifier,使得:

  1. 满足 UID1 和 UID2;
  2. r ≠ r′ 蕴含 uid(r) ≠ uid(r′);
  3. 每个已 seen 的 request 最终都会 accepted。

对于 fail-stop processor system,一个简单 solution 如下。

Replica-generated Unique Identifiers:有 N 个 client 时,每个 state-machine replica sm_i 维护两个 variable:

  • SEEN_i:sm_i 目前为任何 seen request 分配的最大 cuid(sm_i, r);
  • ACCEPT_i:sm_i 目前为任何 accepted request 分配的最大 uid(r)。

收到 request r 时,每个 replica sm_i 计算:

text
cuid(sm_i, r) := max(SEEN_i, ACCEPT_i) + 1 + i/N

这意味着所有 candidate unique identifier 自身也是 unique 的。

随后,replica 使用 agreement protocol 把 cuid(sm_i, r) disseminate 给其他 replica,并参与该 value 的 agreement protocol;它等待从每个 nonfaulty replica 收到一个 candidate unique identifier。

令 NF 为收到 candidate unique identifier 的 replica 集合。最后,replica 计算:

text
uid(r) := max { cuid(sm_j, r) : sm_j ∈ NF }

然后 accept r。

该 protocol 满足上述三个条件:UID1 直接由 uid(r) 的 assignment 得出;UID2 由 cuid(sm_i, r) 的 assignment 得出。

为证明 unique identifier 对每个 request 都 unique,可以注意到:一组 unique value 的 disjoint subset 的 maximum 也彼此 unique。由于 agreement protocol 让所有 replica 从相同 replica 收到相同 value,它们会执行相同 assignment,得到相同 uid(r)。

为证明每个 seen request 最终 accepted,只需证明:对每个 replica sm_j,其他 replica sm_i 最终会得知 cuid(sm_j, r) 或得知 sm_j 已 failure。agreement protocol 的 dissemination 和 fail-stop processor 的定义直接保证这一点。

第 11 页:Identifier 优化与 Faulty Output Device

state machine approach p11

Replica-generated Unique Identifiers protocol 的一个 optimization,是 Cornell ISIS Toolkit [Birman and Joseph 1987] 中 ABCAST protocol 的基础。在该 optimization 中,candidate unique identifier 返回给 client,而不是 disseminate 给其他 state-machine replica。client 随后执行上述 assignment 计算 uid(r),最后使用 agreement protocol 把 uid(r) disseminate 给 state-machine replica。如果 client failure,则由某个 unique replica 代替 client。

可以把 Replica-generated Unique Identifiers protocol 修改为适用于如下 system:processor 可能 Byzantine failure,processor 有 synchronized real-time clock,communication channel 的 message-delivery delay 有 bound——这与使用 synchronized real-time clock 生成 unique identifier 时的 environment 相同。

需要以下改变:首先,每个 sm_i 使用 timeout,避免因为 faulty replica sm_j 而无限等待 candidate identifier dissemination 的 agreement protocol。其次,如果 sm_i 判定 sm_j timeout,它使用 agreement protocol 向所有 replica disseminate “sm_j timeout”。最后,NF 是 ensemble 中的所有 replica,去掉那些至少从 t + 1 个 replica 收到“sm_j timeout”的 sm_j。

注意,导致 faulty replica 提出不是按公式(4)产生的 candidate unique identifier 的 Byzantine failure 不会造成问题。过小 candidate 对 nonfaulty replica 执行公式(5)的结果没有影响;过大的 candidate 则满足 UID1 和 UID2。

4. TOLERATING FAULTY OUTPUT DEVICES

不可能只通过单个 voter 把 state-machine replica ensemble 的 output 合并成一个 output,来实现 t fault-tolerant system。因为 voter 的一次 failure 就可以阻止 system 产生正确 output。

解决方案取决于 ensemble 实现的 state-machine output 是在 system 内部还是外部使用。

4.1 Outputs Used Outside the System

如果 state machine output 发给 output device,那么该 device 本身已经是一个不能容忍其 failure 的 single component。因此,仅容忍 faulty voter 不够;system 还必须容忍 faulty output device。

通常的解决方案是复制 output device 和 voter。每个 voter 组合每个 state-machine replica 的 output,并产生驱动一个 output device 的 signal。读取 system output 的对象被假设会组合 replicated device 的 output。这个不属于 computing system 的 reader 执行关键 voter。

如果 output device 可能 Byzantine failure,那么采用 2t + 1-fold replication,并取 device majority output,就可以容忍最多 t 个 faulty output device。

例如,可以设计 airplane wing flap,使控制它的 2t + 1 个 actuator 不一致时,总是沿 majority 指示方向移动,而不是发生扭转。

如果 output device 只会 fail-stop failure,那么 t + 1-fold replication 就足以容忍 t 个 failure,因为 fail-stop output device 产生的任何 output 都可以认为是正确的。

例如,video display terminal 通常提供足够 redundancy,可以视为 fail-stop:failure detection 由 viewer 执行。面对这种 output device,人可以查看 t + 1 个 device 中的一个,判断 output 是否 faulty;只有在 faulty 时才查看另一个,以此类推。

第 12 页:内部 Output、Dependent Failure 与 Faulty Client

state machine approach p12

4.2 Outputs Used Inside the System

如果 state-machine output 发给 client,那么 client 自己可以组合 ensemble 中 state-machine replica 的 output。此时,voter 是 client 的一部分;voter 只有在 client faulty 时才 faulty,因此 client 因 faulty voter 读到 incorrect output 这一事实无关紧要。

当 Byzantine failure 可能发生时,client 等待从 ensemble 不同成员收到 t + 1 个 identical response,并把它作为 t fault-tolerant state machine 的 response。

当只有 fail-stop failure 可能发生时,client 收到 ensemble 任意成员的 response 后就可以继续,因为 replica 产生的任何 output 都是正确的。

如果 client 与某个 state-machine replica 运行在同一 processor 上,还可以优化 client 实现的 voting。因为 processor 正确意味着 state-machine replica 和 client 都正确;因此,本地运行的 state-machine replica 产生的 response 可直接作为该 client 从 t fault-tolerant state machine 获得的 response。

如果 processor faulty,可以把 client 视为 faulty,因此 client 收到什么 state-machine response 都无关紧要。

Dependent-Failures Output Optimization:如果 client 与 state-machine replica 在同一个 processor 上运行,那么即使可能发生 Byzantine failure,client 也不必为 request 收集 majority response,可以使用本地产生的 single response。

脚注:分析这类 system 的 fault tolerance 时必须小心,因为一个 processor failure 现在可以导致两个 system component failure。大多数讨论隐含假设 system component independent failure;但如果 client 与 state-machine replica 共享 processor,就不一定能把 independent-failure 的 t fault-tolerant system 转换成共享 processor 的 system。

5. TOLERATING FAULTY CLIENTS

实现 t fault-tolerant state machine 并不足以实现 t fault-tolerant system。faulty client 可能发出 request,使 state machine 产生 erroneous output,或 corrupt state machine,从而后续无法正确处理 nonfaulty client 的 request。

本节讨论如何让 state machine 与影响 client 的 fault 隔离。

5.1 Replicating the Client

一种避免 client fault 影响 system 的方法,是复制 client,并让每个 replica 运行在独立 failure 的 hardware 上。

但这种 replication 也要求修改处理该 client request 的 state machine。因为 client 被复制为 N 个 replica 后,state machine 会收到 N 个 request(每个 client replica 一个),而不是原来收到的一个 request。

此外,不同 client replica 发出的 corresponding request 不一定 identical。第一,它们的 unique identifier 不同。第二,除非 original client 本身是 state machine,且使用 Section 3 的方法协调 replica,否则不同 replica 的 corresponding request 可能在 content 上也不同。

例如,如果 client 根据 time-varying sensor value 发出 request,那么不同 replica 读取 sensor 的时间略有不同,因此会产生不同 request。

先考虑一种情况:不同 client replica 发出的 request 只有 unique identifier 不同、content 相同。此时 state machine 需要从处理一个 request 改为处理 N 个 request。修改方式是:把每个 command 改为不立即处理收到的每个 request,而是先 buffer request,直到收到足够多的 request;此后只执行对应 command 一次。

实际上,这是给 state machine 增加一个 voter,用于控制 command invocation。可以把 client replication 对 state-machine designer 隐藏起来:把 voter 放入接收 request、测试 stability、按 unique identifier 对 stable request 排序的 support software 中。

第 13 页:Client Replica Content 差异与 Defensive Programming

state machine approach p13

如果不同 client replica 的 request content 也可能不同,修改 state machine 通常需要利用 application knowledge。

和前面一样,核心思想是把多个 request 转换成一个 request。例如,在 t fault-tolerant system 中,如果收到 2t + 1 个不同 request,每个 request 都包含一个 sensor value,那么可以构造一个包含这些 value median 的 single request,并交给 state machine 处理。

当最多有 t 个 Byzantine fault 时,2t + 1 个 value 的 median 是合理选择,因为它的上下界分别由某个 nonfaulty value 限定。

Marzullo [1989] 讨论了把包含 sensor value 的多个 request 转换成一个 request 的通用方法。该方法把 sensor value 看作包含 actual value 的 interval,再使用 fault-tolerant intersection algorithm 从 interval 集合计算出 single interval(sensor)。

脚注:如果可能发生 Byzantine failure,t fault-tolerant client 需要 2t + 1-fold replication,并在收到 t + 1 个 request 后执行 command。如果 failure 限制为 fail-stop,则 t + 1-fold replication 就足够,收到一个 request 后即可执行 command。

5.2 Defensive Programming

有时不能通过 replication 让 client fault tolerant。有些情况下,sensor 或 processor 不可用,client 根本无法 replicate;另一些情况下,application semantics 没有提供合理方法,把 client replica 的多个 request 转换为 state machine 所需的 single request。

在所有这些情况下,仔细设计 state machine 可以限制 faulty client request 的影响。

例如,Figure 1 的 memory 允许任意 client 写任意 location。因此,faulty client 可以覆盖所有 location,摧毁信息。可以限制每个 client 的 write request 只能写某些 memory location,让 state machine 强制执行这一限制。

在 command 中加入 test 是设计不可被 faulty client corrupt 的 state machine 的另一种方法。例如,Figure 2 中的 mutex 会执行任意 client 发出的 release command,即使该 client 没有 resource access。因此,faulty client 可以发出这样的 request,在第一个 client relinquish access 前就让 mutex 把 resource 授予第二个 client。

更好的 mutex formulation 是:除非 release command 来自当前拥有 exclusive access 的 client,否则忽略它。可以把 release 改为:

text
release: command
    if user ≠ client → skip
    [] waiting = ∅ ∧ user = client → user := ∅
    [] waiting ≠ ∅ ∧ user = client → send OK to head(waiting);
                                       user := head(waiting);
                                       waiting := tail(waiting)
    fi
end release

有时,faulty client 不发 request 与发出 erroneous request 同样 catastrophic。例如,mutex client 在持有 exclusive access 时 failure 并停止,其他 client 就无法获得 access。

除非准备限制正常工作的 process 保持 exclusive access 的时间,否则几乎无法处理这个问题,因为 state machine 无法区分 stopped because failure 的 client 和运行很慢的 client。

但如果 acquire 与 following release 之间的 interval 有 upper bound B,那么 mutex 的 acquire command 可以代表 client 自动 schedule release。

第 14 页:Timeout Request 与使用 Time 发出 Request

state machine approach p14

本文用 notation:

text
schedule(REQUEST) for +T

表示 schedule 一个 REQUEST,其 unique identifier 至少比当前处理 request 的 identifier 大 T。这种 request 称为 timeout request;根据 client-generated request 使用的 stability test,它会在未来某个时间变为 stable。

与 client request 不同,执行 schedule 产生的 request 不需要发送给 ensemble 的所有 state-machine replica,因为每个 replica 都会 independently schedule 自己的、identical copy。

现在可以修改 acquire,自动 schedule 一个 release operation。下面代码假设 TIME 是返回 current time 的 function。

注意,mutex 现在可能代表 client 处理两个 release command:一个来自 client 自身,另一个由它的 acquire request 生成。新的 state variable time-granted 确保忽略多余的 release command。

text
acquire: command
    if user = ∅ → send OK to client;
                  time-granted := TIME;
                  schedule(mutextimeout, time-granted) for +B
    [] user ≠ ∅ → waiting := waiting ◦ client
    fi
end acquire

timeout: command (when-granted: integer)
    if when-granted ≠ time-granted → skip
    [] waiting = ∅ ∧ when-granted = time-granted → user := ∅
    [] waiting ≠ ∅ ∧ when-granted = time-granted →
         send OK to head(waiting);
         user := head(waiting);
         time-granted := TIME;
         waiting := tail(waiting)
    fi
end timeout

6. USING TIME TO MAKE REQUESTS

client 不必显式发送 message 来发出 request。不收到 request 也可以触发 command execution——实际上,允许时间流逝把 request 从 client 传送到 state machine [Lamport 1984]。

使用 time 而不是 message 传送 request 可能有优势,因为实现 IC1、IC2 的 protocol 在 message 总数和 delay 方面都可能成本很高。不过,使用 time 传送 request 的适用性有限,因为 client 无法指定 parameter value。

Section 5 中修订 mutex 的 acquire command、阻止 client failure 后不 release resource 时,就使用了 time 传送 request。那里,acquire 代表正在获得 resource 的 client 自动 schedule 一个 release request。client 只要允许 B 个(logical clock 或 real-time clock)time unit 流逝,就向 mutex 传送 release request。client 可能在 B 个 time unit 到达前用 message 发出 release request,目的只是提高 shared resource utilization。

下面用 Figure 3 的 tally 说明使用 time 传送 request 的更 dramatic example。假设:

  • 所有 client 和 state-machine replica 的 clock(logical 或 real-time)同步误差不超过 r;
  • election 从 time Start 开始,且所有 client 和 state-machine replica 都知道这一点。

client 可以通过什么都不做来投票给 default;只有 client 投票不同于 default 时,才需要实际发送 request message。

Transmitting a Default Vote:如果 client 到 Start + r 时仍没有发出 request,那么就视为该 client 发出了包含 default vote 的 request。

注意,default 不必固定,也不必在投票时已经知道。例如,default 可以是“投票给任意 client 首先通过 nondefault vote message 投给的 client”。在这种情况下,只要一个 client 通过 actual message 投票,整个 election 就可以完成。

第 15 页:Reconfiguration 的必要条件

state machine approach p15

例如,default vote 可以是“投票给任何 client 首先 cast nondefault vote 的 candidate”。这样,只要有一个 client 使用 actual message cast vote,整个 election 就能进行。

7. RECONFIGURATION

如果可以从 ensemble 中移除运行在 faulty processor 上的 state-machine replica,并添加运行在 repaired processor 上的 replica,那么 ensemble 可以容忍超过 t 个 failure。(对 client 和 output device 的 copy 也可以作相似论证。)

令 P(r) 表示 time r 时运行某个目标 state machine replica 的 processor 总数,F(r) 表示其中 faulty processor 的数量。为了让 ensemble 产生正确 output,必须满足:

Combining Condition:对所有 0 ≤ r,有 P(r) − F(r) > Enuf,其中:

text
Enuf = 2t  如果可能发生 Byzantine failure
        t   如果只可能发生 fail-stop failure

processor failure 会增大 F(r),从而降低 P(r) − F(r),使 Combining Condition 可能不成立。

当 Byzantine failure 可能发生时,如果能够识别 faulty processor,那么把它从 ensemble 中移除,会在不进一步减少 P(r) − F(r) 的情况下减少 Enuf,从而可以避免 Combining Condition 被违反。

当只可能发生 fail-stop failure 时,只有增加 nonfaulty processor 的数量——添加一个 repaired processor——才能避免 Combining Condition 被违反,因为只有增加 P(r) 才能保证 P(r) − F(r) > 0。

因此,如果下面条件成立,就可能永久维持 Combining Condition,容忍 system lifetime 内无界数量的 failure:

  • F1:如果可能发生 Byzantine failure,那么在后续 processor failure 使 Combining Condition 被违反前,必须识别并移除运行在 faulty processor 上的 state-machine replica。
  • F2:在后续 processor failure 使 Combining Condition 被违反前,必须把运行在 repaired processor 上的 state-machine replica 加入 ensemble。

F1 和 F2 限制 failure 与 repair 发生的 rate。

从 state-machine ensemble 中移除 faulty processor 还可以改善 system performance。因为实现 Agreement 所需发送的 message 数量,通常与必须对 request content 达成一致的 state-machine replica 数量成正比。有些 agreement protocol 的 execution time 也与 faulty processor 数量成正比。因此,移除 faulty processor 显然会同时降低 protocol 的 message complexity 和 time complexity。

从 system 添加或移除 client,只需修改 state machine:以后对来自该 client 的 request 响应或忽略即可。

添加 output device 也直接:state machine 开始向该 device 发送 output。移除 output device 则通过 disable device 实现,即把 device 置于不再影响 environment 的 state。

例如,可以关掉 CRT terminal 的 brightness,使屏幕无法读取;也可以打开控制 airplane wing flap 的 hydraulic actuator 的 cutoff valve,使 actuator 不再对 control surface 施加 pressure。

不过,disable faulty output device 并不总是可能:关闭 brightness 可能对 screen 没有作用,cutoff valve 也可能失效。因此,有些 system 只能容忍总数不超过 t 的 actuator fault,因为 faulty actuator 无法 disable。

第 16 页:Configuration Sets 与 Configuration Management

state machine approach p16

按 state machine 和 client 组织的 system configuration 可以用三个 set 描述:client set C、state-machine replica set S 和 output-device set O。

S 由 agreement protocol 使用,因此 client 和 state-machine replica 必须知道它;output device 也可以使用 S,判断哪些 state-machine replica 发出的 send operation 应忽略。

state-machine replica 使用 C 和 O 判断应该处理哪些 client 的 request,以及应该向哪些 device 发送 output。因此,所有 state-machine replica 都必须能获得 C 和 O。

要支持 system configuration 改变,必须解决两个问题:第一,C、S、O 的 value 必须在需要时可用;第二,每当 client、state-machine replica 或 output device 加入 configuration 时,必须更新该 element 的 state,使其反映 system current state。

下面两节讨论这两个问题。

7.1 Managing the Configuration

可以使用 system 中的 state machine 管理 system configuration。把 C、S、O 存储为 state variable,并通过 command 修改。

每个 configuration 对一组 request 有效——这些 request 的 uid(r) 位于两个 successive configuration-change request 定义的 range 内。因此,每当 client、state-machine replica 或 output device 执行与处理 r 有关的 action 时,它都使用对 r 有效的 configuration。

这意味着,configuration-change request 必须把 new configuration schedule 到足够远的 future point,使 client、state-machine replica 和 output device 都能在它真正生效前得知 new configuration。

有多种方法让 client 和 output device 获得 configuration information(该信息已经在 state machine 中可用)。一种方法是让 client 和 output device 周期性 query state machine,获取有关 pending configuration change 的信息。显然,如果 client 或 output device 与 state-machine replica 共享 processor,该方案的 communication cost 会降低。

另一种方法是:state machine 在 normal processing 中向 client 和 output device 发送 message 时,顺便把 configuration change information 放入 message。这样需要 state machine 与 client、state machine 与 output device 之间周期性通信。

修改 system configuration 的 request 由 failure/recovery detection mechanism 发出。可以把该 mechanism 看作一组 client:C、S 或 O 中的每个 element 对应一个 configurator。每个 configurator 负责检测它管理的 single object 的 failure 或 repair;检测到 event 后,发出修改 configuration 的 request。

configurator 很可能是现有 client 或 state-machine replica 的一部分,也可以用多种方式实现。

element 是 fail-stop 时,configurator 只需检查该 element 的 failure-detection mechanism。element 可能 Byzantine failure 时,failure detection 并不总是可能。但在可以检测时,reconfiguration 能提供更高 fault tolerance。

nonfaulty configurator 满足两个 safety property:

  • C1:只有 faulty element 会从 configuration 中移除;
  • C2:只有 nonfaulty element 会加入 configuration。

什么都不做的 configurator 也满足 C1、C2。只有 F1、F2 也成立时,changing configuration 才能增强 fault tolerance。要使 F1、F2 成立,configurator 还必须:(1)检测 failure 并导致 element 被移除;(2)检测 repair 并导致 element 被加入。因此,configurator 增强 fault tolerance 的程度,直接取决于它完成这两件事的程度。

第 17 页:Configurator、Repaired Object 与 State Integration

state machine approach p17

application semantics 可以帮助判断 failure。例如,state machine 可以比较不同 client 发出的 request,或比较同一个 client 在一段时间内发出的 request,从而推断 client faulty。

为了判断运行 state-machine replica 的 processor 是否 faulty,state machine 可以监测 agreement protocol execution 期间其他 state-machine replica 发送的 message。

state-machine replica 还可以监测 actuator 所控制的 environment 的某些 aspect,判断 output device 是否 faulty。

processor 等 element 有 internal failure-detection circuitry,可以读取它来判断 element 是否 faulty、是否已经 repaired 并 restarted。对此类 element 的 configurator,可以让 state machine 周期性 polling 该 circuitry 来实现。

分析使用 configurator 的 system fault tolerance 时,可以把 configurator failure 视为它管理的 element failure。因为从 Combining Condition 的角度看,把 nonfaulty element 从 system 中移除,与把 faulty element 加入 system,和该 element failure 的效果相同。

因此,在 t fault-tolerant system 中,管理 nonfaulty element 的 faulty configurator 数量,加上拥有 nonfaulty configurator 的 faulty component 数量,必须不超过 t。

7.2 Integrating a Repaired Object

加入 configuration 的 element 不仅必须 nonfaulty,还必须拥有正确 state,使其 action 与 system 其他部分一致。

定义 e[r_i, r_j] 为:nonfaulty system element e 处理 requests r_i 到 r_j 后应处于的 state。刚在 request r_join 后加入 configuration 的 element,必须在参与 running system 前处于 e[r_join] state。

如果 element 的 current state 完全由它此前处理的最近 k 个 input 定义(其中 k 固定),则称该 element self-stabilizing [Dijkstra 1974]。让这种 element 运行足够长时间,确保处理了 k 个 input,就足以让它进入 e[r_join] state。

遗憾的是,设计 self-stabilizing state machine 并不总是可能。

当 element 不是 self-stabilizing、processor 是 fail-stop、且使用 logical clock 时,只需一个 state-machine replica sm_i 的 cooperation 就足以把 new element e 加入 system。因为从任意 state-machine replica sm_i 获得的 state information 都是正确的。

要在 request r_join 处集成 e,replica sm_i 必须获得足够 state information,组装出 e[r_join],并把它 forward 给 e。

如果 e 是 output device,e[r_join] 很可能只是少量 device-specific setup information;它变化不频繁,可以存储在 sm_i 的 state variables 中。

如果 e 是 client,e[r_join] 所需 information 通常基于最近读取的 sensor value,因此可以使用其他 client 提供给 sm_i 的 information 确定。

如果 e 是 state-machine replica,e[r_join] 所需 information 存储在 sm_i 的 state variables 和 pending request 中。

集成 client 或 output device 的 protocol 很简单:在发送处理 unique identifier 大于 uid(r_join) 的 request 所产生的 output 之前,把 e[r_join] 发送给 e。

集成 new state-machine replica sm_new 的 protocol 更复杂。只把所有 state variable 的 value 和 pending request 的 copy 发送给 sm_new 不够,因为 sm_i 发送 e[r_join] 后,某个 client request 可能才到达 sm_i,而在 repair 前就交付给 sm_new。这样,该 request 既不会反映在 sm_i forward 的 state information 中,也不会直接到达 sm_new。

因此,sm_i 必须在一段时间内 relay 它从 client 收到的 request 给 sm_new。

第 18 页:Integration Protocol 与 Restart Stability

state machine approach p18

由于来自同一个 client 的 request 按发送顺序、按递增 request identifier 到达 sm_new,一旦 sm_new 直接从 client c 收到一个 request,就不需要再 relay 来自 c、且 identifier 更大的 request。

如果 sm_i 告知 sm_new 它从每个 client c 直接收到的 request 的 identifier,那么 sm_new 就知道何时可以停止 relay 来自 c 的 request。

完整 integration protocol 总结如下。

Integration with Fail-stop Processors and Logical Clocks:state-machine replica sm_i 可以在 request r_join 处把 element e 加入 running system:

  • 如果 e 是 client 或 output device,sm_i 把 state variable 的相关部分发送给 e,并且在发送 unique identifier 大于 r_join 上 identifier 的 request 所产生的任何 output 之前完成该发送。
  • 如果 e 是 new state-machine replica sm_new,那么 sm_i:
    1. 向 sm_new 发送自己的 state variables value 和 pending request copy;
    2. 随后,对每个 client c,把它收到的每个后续 request r 发送给 sm_new,直到 uid(r) < uid(r_c),其中 r_c 是 sm_new restart 后直接从 c 收到的第一个 request。

脚注:sm_new 可能收到某些 request 的 duplicate copy。

存在 synchronized real-time clock 时,可以简化这个 protocol,因为 sm_i 可以根据 time passage 判断何时停止 relay message。

假设像 Section 3.2.2 那样,存在常数 A,具有 unique identifier uid(r) 的 request r,按照 receiving state-machine replica 的 local clock,最晚在 uid(r) + A 被每个 correct replica 收到。

令 sm_new 在 time r_join 加入 configuration。根据定义,sm_new 一定能收到 requesting client 在 time r_join 之后发出的每个 request。由于 unique identifier 来自发出 request 的 client 的 real-time clock,sm_new 一定会收到所有 uid(r) ≥ r_join 的 request。

第一个这样的 request r 会在 sm_i 的 clock 达到 r_join + A 前被 sm_i 收到。因此,r_join + A 之后 sm_i 收到的每个 request,也必须已由 sm_new 直接收到。显然,sm_i 不必 relay 这些 request。

Integration with Fail-stop Processors and Real-time Clocks:state-machine replica sm_i 可以在 request r_join 处集成 element e:

  • 如果 e 是 client 或 output device,sm_i 把 state variable 的相关部分发送给 e,并在发送 unique identifier 大于 r_join 上 identifier 的 request output 前完成;
  • 如果 e 是 state-machine replica sm_new,那么 sm_i:
    1. 发送 state variables value 和 pending request copy;
    2. 随后发送接下来 duration 为 A 的 interval 内收到的每个 request。

当 processor 可能 Byzantine failure 时,单个 state-machine replica sm_i 不足以集成 new element,因为 sm_i 提供的 state information 可能错误。为了在 2t + 1 个 state-machine replica 的 system 中容忍 t 个 failure,必须获得 t + 1 份 identical state-information copy 和 t + 1 份 identical relayed-message copy;其他部分仍按 real-time clock protocol 进行。

7.2.1 Stability Revisited

当 client 发出的 request 可以从两个 source 收到——client 本身和 relay——Section 3 的 stability test 不再适用。

在 relay message 的 interval 内,被集成的 state-machine replica sm_new 可能直接从 c 收到 request r,随后通过 sm_i relay 收到另一个 request r′,且 uid(r) > uid(r′)。

state machine approach p19

解决方法是:sm_new 只有在不可能再收到来自 c 的 relayed request 后,才把直接从 c 收到的 request 视为 stable。因此 stability test 必须修改为:

Stability Test During Restart:restarting state-machine replica sm_new 直接从 client c 收到的 request r,只有在 sm_new 收到另一个 processor relay 的、来自 c 的最后一个 request 后,才 stable。

实现这个新 stability test 的明显方法,是在不再 relay 来自 c 的 request 时,向 sm_new 发送一条 message。

state machine approach 最早由 Lamport [1978a] 在不会发生 failure 的 environment 中描述。Schneider [1982] 将其推广到 fail-stop failure;Lamport [1978b] 推广到介于 fail-stop 与 Byzantine failure 之间的一类 failure;Lamport [1984] 推广到完整 Byzantine failure。

这些 state-machine implementation 最初由 Schneider [1985] 使用 Agreement、Order requirement 和 stability test 进行 characterization。

state machine approach 曾用于设计重要的 fault-tolerant process-control application [Wensley et al. 1978];也用于 distributed synchronization 的设计,包括 read/write lock 和 distributed semaphore [Schneider 1980]、CSP 的 input/output guard 和 conditional Ada SELECT statement [Schneider 1982],以及一种 fail-stop processor approximation 的设计——底层 processor failure 后可以任意行为 [Schlichting and Schneider 1983; Schneider 1984]。

Bernstein [1985] 描述的 stable-storage implementation 利用 synchronous broadcast network 的 property,避免显式的 Agreement、Order protocol,并使用 Section 7 描述的 Transmitting a Default Vote。

Cristian 等人 [1985] 提出的 common storage notion,是使用 Real-time Clock Stability Test 的 state-machine implementation。

Skeen [1982] 的 decentralized commit protocol 可以看作 state machine approach 的直接 application;Gray [1978] 的 two-phase commit protocol 则可以通过对 failure 作 restrictive assumption,并基于这些 assumption 执行 optimization,从 decentralized commit 得到。

Paxon Synod commit protocol [Lamport 1989] 也可以从 state machine approach 理解。它与 standard three-phase commit protocol 相似,但 execution cost 更低。

Liskov 和 Ladin [1986] 实现 highly available distributed service 的方法也使用 state machine approach,并利用 application semantics 和 fail-stop processor 做了 clever optimization,改善 stability test 与 agreement protocol。

Garcia-Molina 等人 [1986] 讨论了 state machine approach 用于 database system transaction management 的问题。Pittelli 和 Garcia-Molina [1989] 报告了在 SUN workstation network 上评估不同 stability test performance 的 experiment;该研究还报告 request batching 的 performance,以及 Logical Clock Stability Test Tolerating Fail-stop Failures 中使用 null request 的效果。

两个 operating-system toolkit 都包含支持 Replica Coordination 的 Agreement、Order primitive。

Cornell 开发的 ISIS Toolkit [Birman 1985] 提供 ABCAST 和 CBCAST,允许 application programmer 控制 process group(即 state-machine replica collection)成员之间 message 的 delivery order。ABCAST 保证所有 state-machine replica 按相同 order 处理 request;CBCAST 允许更灵活的 message ordering,并保证 causally related request 按正确 relative order delivery。

ISIS 已被用于实现多个 prototype application。其中一个例子是 RNFS(replicated NFS)file system:它是一种容忍 fail-stop failure、运行在 NFS 之上的 network file system,由 Marzullo 和 Schmuck [1988] 使用 state machine approach 设计。

第 20 页:Psync、Acknowledgments 与 References 开始

state machine approach p20

Psync primitive [Peterson et al. 1989] 已在 x-kernel [Hutchinson and Peterson 1988] 中实现,与 ISIS 的 CBCAST 类似。不过,Psync 向 programmer 提供 message “potential causality” relation 的 graph,而 CBCAST 不提供。

Psync 旨在作为实现 ABCAST、CBCAST 等 protocol 的 low-level protocol;ISIS primitive 面向 application programmer,因此隐藏 “potential causality” relation,同时提供 group management 和 failure reporting support。

ACKNOWLEDGMENTS

本文材料部分得到 Office of Naval Research contract N00014-86-K-0092、National Science Foundation grants DCR-8320274 和 CCR-8701103,以及 Digital Equipment Corporation 的支持。

文中的 opinions、findings、conclusions 或 recommendations 均属于作者,不代表这些机构的意见。

过去五年与 O. Babaoglu、K. Birman 和 L. Lamport 的讨论帮助我形成本文 ideas。J. Aizikowitz、O. Babaoglu、A. Bernstein、K. Birman、R. Brown、D. Gries、K. Marzullo 和 B. Simons 对 paper draft 提供了有用 comments。

非常感谢 ACM Computing Surveys managing editor Sal March 仔细阅读本文,并提出许多有帮助的 comments。

REFERENCES

第 21 页:References 完整列表

state machine approach p21

  • Aizikowitz, J. 1989. Designing distributed services using refinement mappings. Ph.D. dissertation, Computer Science Dept., Cornell Univ., Ithaca, New York. Also available as Tech. Rep. TR 89-1040。
  • Bernstein, A. J. 1985. A loosely coupled system for reliably storing data. IEEE Transactions on Software Engineering SE-11(5), 446–454。
  • Birman, K. P. 1985. Replication and fault tolerance in the ISIS system. In Proceedings of the 10th ACM Symposium on Operating Systems Principles(Orcas Island, Washington, Dec. 1985),ACM,pp. 79–86。
  • Birman, K. P., and Joseph, T. 1987. Reliable communication in the presence of failures. ACM Transactions on Computer Systems 5(1), Feb. 1987, pp. 47–76。
  • Cristian, F., Aghili, H., Strong, H. R., and Dolev, D. 1985. Atomic broadcast: From simple message diffusion to Byzantine agreement. In Proceedings of the 15th International Conference on Fault-tolerant Computing(Ann Arbor, Mich., June 1985),IEEE Computer Society。
  • Dijkstra, E. W. 1974. Self stabilization in spite of distributed control. Communications of the ACM 17(11), Nov. 1974, p. 643–644。
  • Fischer, M., Lynch, N., and Paterson, M. 1985. Impossibility of distributed consensus with one faulty process. Journal of the ACM 32(2), Apr. 1986, pp. 374–382。
  • Garcia-Molina, H., Pittelli, F., and Davidson, S. 1986. Application of Byzantine agreement in database systems. ACM Transactions on Database Systems 11(1), Mar. 1986, pp. 27–47。
  • Gopal, A., Strong, R., Toueg, S., and Cristian, F. 1990. Early-delivery atomic broadcast. To appear in Proceedings of the 9th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing(Quebec City, Quebec, Aug. 1990)。
  • Gray, J. 1978. Notes on database operating systems. In Operating Systems: An Advanced Course, Lecture Notes in Computer Science, Vol. 60. Springer-Verlag, New York, pp. 393–481。
  • Halpern, J., Simons, B., Strong, R., and Dolev, D. 1984. Fault-tolerant clock synchronization. In Proceedings of the 3rd ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing(Vancouver, Canada, Aug.),pp. 89–102。
  • Hutchinson, N., and Peterson, L. 1988. Design of the x-kernel. In Proceedings of SIGCOMM ’88—Symposium on Communication Architectures and Protocols(Stanford, Calif., Aug.),pp. 65–75。
  • Lamport, L. 1978a. Time, clocks and the ordering of events in a distributed system. Communications of the ACM 21(7), July, pp. 558–565。
  • Lamport, L. 1979b. The implementation of reliable distributed multiprocess systems. Computer Networks 2, pp. 95–114。
  • Lamport, L. 1984. Using time instead of timeout for fault-tolerance in distributed systems. ACM Transactions on Programming Languages and Systems 6(2), Apr., pp. 254–280。
  • Lamport, L. 1989. The part-time parliament. Technical Report 49, Digital Equipment Corporation Systems Research Center, Palo Alto, Calif。
  • Lamport, L., and Melliar-Smith, P. M. 1984. Byzantine clock synchronization. In Proceedings of the 3rd ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing(Vancouver, Canada, Aug.),pp. 68–74。
  • Lamport, L., Shostak, R., and Pease, M. 1982. The Byzantine generals problem. ACM Transactions on Programming Languages and Systems 4(3), July, pp. 382–401。
  • Liskov, B., and Ladin, R. 1986. Highly available distributed services and fault-tolerant distributed garbage collection. In Proceedings of the 5th ACM Symposium on Principles of Distributed Computing(Calgary, Alberta, Canada, Aug.),ACM,pp. 29–39。
  • Mancini, L., and Pappalardo, G. 1988. Towards a theory of replicated processing. In Formal Techniques in Real-Time and Fault-Tolerant Systems, Lecture Notes in Computer Science, Vol. 331. Springer-Verlag, New York, pp. 175–192。
  • Marzullo, K. 1989. Implementing fault-tolerant sensors. Tech. Rep. TR 89-997, Computer Science Dept., Cornell Univ., Ithaca, New York。
  • Marzullo, K., and Schmuck, F. 1988. Supplying high availability with a standard network file system. In Proceedings of the 8th International Conference on Distributed Computing Systems(San Jose, CA, June),IEEE Computer Society,pp. 447–455。
  • Peterson, L. L., Buchholz, N. C., and Schlichting, R. D. 1989. Preserving and using context information in interprocess communication. ACM Transactions on Computer Systems 7(3), Aug., pp. 217–246。
  • Pittelli, F. M., and Garcia-Molina, H. 1989. Reliable scheduling in a TMR database system. ACM Transactions on Computer Systems 7(1), Feb., pp. 25–60。
  • Schlichting, R. D., and Schneider, F. B. 1983. Fail-Stop processors: An approach to designing fault-tolerant computing systems. ACM Transactions on Computer Systems 1(3), Aug., pp. 222–238。
  • Schneider, F. B. 1980. Ensuring consistency on a distributed database system by use of distributed semaphores. In Proceedings of International Symposium on Distributed Data Bases(Paris, France, Mar.),INRIA,pp. 183–189。
  • Schneider, F. B. 1982. Synchronization in distributed programs. ACM Transactions on Programming Languages and Systems 4(2), Apr., pp. 179–195。
  • Schneider, F. B. 1984. Byzantine generals in action: Implementing fail-stop processors. ACM Transactions on Computer Systems 2(2), May, pp. 145–154。
  • Schneider, F. B. 1985. Paradigms for distributed programs. In Distributed Systems: Methods and Tools for Specification, Lecture Notes in Computer Science, Vol. 190. Springer-Verlag, New York, pp. 343–430。
  • Schneider, F. B. 1986. A paradigm for reliable clock synchronization. In Proceedings of the Advanced Seminar on Real-Time Local Area Networks(Bandol, France, Apr.),INRIA,pp. 85–104。
  • Schneider, F. B., Gries, D., and Schlichting, R. D. 1984. Fault-tolerant broadcasts. Science of Computer Programming 4, pp. 1–15。
  • Siewiorek, D. P., and Swarz, R. S. 1982. The Theory and Practice of Reliable System Design. Digital Press, Bedford, Mass。
  • Skeen, D. 1982. Crash recovery in a distributed database system. Ph.D. dissertation, Univ. of California at Berkeley, May。
  • Strong, H. R., and Dolev, D. 1983. Byzantine agreement. Intellectual Leverage for the Information Society, Digest of Papers(Compcon 83, IEEE Computer Society, Mar.),pp. 77–82。
  • Wensley, J., Wensky, J. H., Lamport, L., Goldberg, J., Green, M. W., Levitt, K. N., Melliar-Smith, P. M., Shostak, R. E., and Weinstock, C. B. 1978. SIFT: Design and analysis of a fault-tolerant computer for aircraft control. Proceedings of the IEEE 66(10), Oct., pp. 1240–1255。

Received November 1987; final revision accepted January 1990。

机制索引

机制本文位置核心含义
State machineSection 1用 deterministic command/state transformation 定义 service
Replica CoordinationSection 3所有 replica 接收并按相同顺序处理 request
AgreementSection 3.1每个 nonfaulty replica 收到每个 request
OrderSection 3.2所有 replica 以相同 relative order 处理 request
Logical-clock stabilitySection 3.2.1收到所有 client 的更大 timestamp 后执行 request
Real-time stabilitySection 3.2.2根据 clock、message delay bound 判断 request stable
Replica-generated identifierSection 3.2.3replica 协商 candidate,再确定 unique identifier
Output votingSection 4复制 voter/device,按 failure model 合并 output
Faulty-client isolationSection 5client replication、request aggregation、defensive command check
Time-triggered requestSection 6通过“不发送”或 timeout 让时间触发 command
ReconfigurationSection 7管理 C、S、O,移除 faulty object、加入 repaired object

本篇验收

  • [x] Cornell 官方 SMSurvey.pdf 已固定到 source/state-machine-approach-schneider.pdf。
  • [x] 21 个 PDF 页面均已按原始 page rectangle 渲染为 PNG,并保存到 assets/45 State Machine Approach/;页面尺寸差异未被强行统一。
  • [x] 21 个页面图片均在对应译文前按原页顺序嵌入,显示宽度统一为 600。
  • [x] Abstract、Sections 1–8、Figure 1–4、memory/mutex/tally 伪代码、Agreement/Order、三种 stability test、output/client fault、time-triggered request、reconfiguration、repair integration、restart stability、Acknowledgments 和完整 References 均已覆盖。
  • [x] state machine、Agreement、Order、stability、Byzantine、fail-stop、request identifier、quorum、configurator 等术语按本系列约定保留 English 或中英并列。
  • [x] 本地源文件 SHA-256:2a018ab1134a7064815f89f246f36e17478fd65400a7939d2468d8a1cf6cd46a。

参考资料

← 返回列表
← 上一篇 论文:Viewstamped Replication Revisited 下一篇 → 论文:The Byzantine Generals Problem

评论 (0)

暂无评论,来留下第一条吧。
登录 或 注册 后才能发表评论