| One important basic issue of distributed systems is the Leader Election algorithm.This article focuses on this issue.Through the simulation experiment of the Loosly-Stabilizing Leader Election,the algorithm is verified in all aspects,and the parameters of the Loosly-Stabilizing Leader Election are further optimized and propose an improvement Loosly-Stabilizing Leader Election.Leader Election as the basic problem of distributed system has been concerned by many researchers.However,the current research is less concerned with the self-stability of the Leader Election algorithm.The definition of Self-Stabilizing Leader Election can be summarized as two characteristics:(1)Convergence characteristics.The algorithm guarantees that it starts running in any arbitrary initial configuration and gradually converges to meet a expected configuration.This expectation configuration is to select the only leader among the groups.(2)Close characteristics.After reaching the expected configuration,the algorithm can keep this configuration forever.Although the self-stabilizing election algorithm shows extremely high fault tolerance,due to its extremely severe requirements,it is extremely difficult and sometimes impossible to design self-stabilizing election algorithms.Loosly-Stabilizing Leader Election algorithm relaxes some of the requirements of the self-stabilizing election algorithm.Loosly-Stabilizing Leader Election algorithm starts from an arbitrary initial configuration,guaranteed to converge to the expected stable state in a limited time,but does not maintained the expected configuration forever,just stay for an extremely long time.In this paper,we simulate the Loosely-Stabilized Leader Election algorithm based on the Population Protocols model and propose a new lower value of s for the algorithm.This lower value can be used without affecting the algorithm colse characteristics,to significantly reduce the convergence time of the algorithm.Secondly,this paper also proposes an improved Loosely-Stabilizing Leader Election algorithm.Through the simulation experiment of the new algorithm,it verifies that the new algorithm exhibits better convergence time complexity than the original algorithm. |