---non-centralized algorithm for distributed system mutual exclusion algorithm

Source: Internet
Author: User

There is a single point of failure for the centralized algorithm, so let's take a look at the non-centralized algorithm.

Assuming that a copy of the shared resource is replicated n times, each copy has its own collaborator control access, and if a process is to access the shared resource, it is primarily M>N/2 to allow the co-authors to vote.

1, if process 0 is to initiate access requests, only 5 of the 8 collaborators (including themselves) are allowed to vote.

Figure 1

However, the algorithm also has its own shortcomings, that is, when a co-author crashes, it will forget the previous vote, it may be after the reply to vote for the other requestor, such as the P process has been allowed to access the shared resources, then the collaborator Reset, and allow the Q process to access the shared resources, there may be inconsistencies.

To prevent many processes from initiating access requests at the same time, no one can access the shared resource, the process initiating the access could take the request with a timestamp, the other collaborators would vote in chronological order, and the requestor would need to notify all other collaborators that the access was released after the end of the visit.

---non-centralized algorithm for distributed system mutual exclusion algorithm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.