分布式系统中的启动器节点

Initiator nodes in a distributed system

我有一个任务要找出分布式系统中状态记录算法的所有可能发起节点。

给出的问题正是

"Write a program to find out the all possible initiator nodes for a state recording algorithm in a distributed system.".

我想提一下,我们在分布式操作系统课程中学习了Chandy - Lamport的全局状态记录算法。我为 Chandy - Lamport 的另一项任务的全局状态记录算法编写了代码。

这个启动节点代表什么?我以为那些记录了他们对应状态的节点。我对吗?我必须在 java 中编写代码。请建议我遵循的方法或算法。

根据 Chandy-Lamport algorithm 上的维基百科页面:

The assumptions of the algorithm are as follows:

  • There are no failures and all messages arrive intact and only once
  • The communication channels are unidirectional and FIFO ordered
  • There is a communication path between any two processes in the system
  • Any process may initiate the snapshot algorithm
  • The snapshot algorithm does not interfere with the normal execution of the processes
  • Each process in the system records its local state and the state of its incoming channels

The algorithm works using marker messages. Each process that wants to initiate a snapshot records its local state and sends a marker on each of its outgoing channels. All the other processes, upon receiving a marker, record their local state, the state of the channel from which the marker just came as empty, and send marker messages on all of their outgoing channels. If a process receives a marker after having recorded its local state, it records the state of the incoming channel from which the marker came as carrying all the messages received since it first recorded its local state.

您使用的术语与维基百科描述略有不同,但我认为您的 "nodes" 对应于上面的 "processes"。因此,"initiator node" 只是一个启动(请求)快照的节点。

如果这是您的术​​语的意思,那么使用 Chandy-Lamport 算法,任何节点都可以是发起节点。因此问题的答案是"all of them".

但是,考虑到答案/解决方案的微不足道的性质,我怀疑这不是您作业的真正含义。要么你遗漏了一些上下文,要么任务陈述错误。我建议你问问你的导师。

(或者...也许是 "trick question"。)