Introduction - If you have any usage issues, please Google them yourself
The snapshot algorithm of global state is implemented, and the following programs are monitored: two processes P and Q are connected into a ring by two channels, and they continuously rotate the message M. At any time, there is only one copy of m in the system. The state of each process is the number of times it receives M. P sends m first. At some point, P gets the message and its status is 101. After M is sent, P starts the snapshot algorithm, and records the global status reported by the snapshot algorithm.