MIT 6.824 Lec4 VMware FT Q&A

The introduction says that it is more difficult to ensure
deterministic execution on physical servers than on VMs. Why is this
the case?

在vm上更容易实现是因为hypervisor可以模拟和控制硬件的行为,使得primary vm和backup vm保持同步,比如时钟中断。

What is a hypervisor?

hypervisor是虚拟机系统中的一部分,相当于virtual machine monitor。hypervisor通过虚拟化技术来对电脑模拟,并且在虚拟电脑中运行操作系统,这种虚拟电脑被称为虚拟机。在这篇文章中,primary vm和backup vm都是指的是虚拟机,FT是hypervisor支持的一部分功能。

Both GFS and VMware FT provide fault tolerance. How should we
think about when one or the other is better?

FT提供的是强一致性保证,而GFS提供的是弱一致性保证。GFS只是针对存储系统提供了一致性的解决方案,而FT则是对整个系统的完整一致性保证。

How do Section 3.4’s bounce buffers help avoid races?

在没有 VM-FT 的情况下,相关硬件会通过 DMA 将该数据复制到内存中 。若 APP/OS 也在同时读取这块内存。那么对于 primary 和 backup ,由于时间上的微小差异,可能一个在 DMA 之前读取,一个在 DMA 之后读取,就导致了不一致 。解决方法是使用 bounce buffer ,它的大小与磁盘操作访问的内存大小相同 。 primary 的 Hypervisor 首先复制网络数据或磁盘块到 bounce buffer ,此时 primary 无法访问它 ,Hyperbisor 中断 primary 使其暂停执行,并记录中断的指令 。然后 Hypervisor 将 bounce buffer 中的内容复制到 primary 的内存 ,并让其继续执行 。通过 logging channel 将数据送到 backup 之后,backup 的 Hypervisor 在相同指令处中断 backup ,将数据复制到 backup 的内存后,最后恢复 backup 的执行 。

What is “an atomic test-and-set operation on the shared storage”?

shared storage中通过共享flag标志来解决split brain问题,并且通过test-and-set操作来访问和设置标志。flag初始值被置为false,test-and-set操作的代码如下所示:

  test-and-set() {
    acquire_lock()
    if flag == true:
      release_lock()
      return false
    else:
      flag = true
      release_lock()
      return true

通过这种方式,每次只能由一个primary vm或backup vm进入go live状态。

How much performance is lost by following the Output Rule?

根据实验结果来看,output rule确实降低了log channel的传输速率,但是影响并不大。

What if the application calls a random number generator? Won’t that
yield different results on primary and backup and cause the executions
to diverge?

primay vm和backup vm会得到相同的数字,因为hypervisor可以控制所有ramdom生成器所需要的数据资源,比如当前时间,硬件周期计数或是时钟中断。这些资源primary vm都会发送给backup vm,从而能够生成相同的random number。

What happens if the primary fails just after it sends output to the
external world?

backup vm会在接管primary vm之后重新output,这样就会出现两次重复的output,但并不会造成任何影响。对于网络数据包来说,TCP会处理重复数据包,对于disk来说,会覆盖写入。

Section 3.4 talks about disk I/Os that are outstanding on the
primary when a failure happens; it says “Instead, we re-issue the
pending I/Os during the go-live process of the backup VM.” Where are
the pending I/Os located/stored, and how far back does the re-issuing
need to go?

当disk I/O发生故障时,只会出现开始disk I/O的中断log entry,并没有disk I/O完成的中断log entry。backup vm在进行replay时,如果包含I/O完成的中断log entry,则不用重新进行disk I/O,如果不包含中断完成的log entry,则需要重新进行disk I/O。

How is the backup FT able to deliver an interrupt at a particular
point in the backup instruction stream (i.e. at the same instruction
at which the interrupt originally occured on the primary)?

许多CPU都支持performance counter功能。FT VVM在告知CPU执行的指令数目之后,CPU执行完相应数目的指令陷入FT VVM中断。

How secure is this system?

作者申明hypervisor可以自己抵御恶意进攻。

Is it reasonable to address only the fail-stop failures? What are
other type of failures?

这是合理的,因为实际环境中绝大多数的故障都是fail-stop故障。还有一部分故障是拜占庭故障,我们将在后续的课程中介绍。


版权声明:本文为weixin_46840831原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。