apanay20 / Lelann-Token-ring-Algorithm

Implementation of Lelann's token-ring algorithm, supporting process failures and insertion/removal of processes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

This is an implementation of the Lelann's token-ring algorithm. The implementation take into account failure of processes, supports the insertion of a new process in the ring and every process can leave the ring at any time. Monitor script is not necessary for the algorithm, is used just for printing messages.

Algorithm

  • Processes are arranged in a logical ring
  • At start, process 0 is given a token
    • Token circulates around the ring in a fixed direction via point-to-point messages
    • When a process acquires the token, it has the right to enter the critical section
    • After exiting critical section, it passes the token on

Prerequisites

Below are shown the necessary python library to run the algorithm.

  • ZeroMQ
    pip install pyzmq

About

Implementation of Lelann's token-ring algorithm, supporting process failures and insertion/removal of processes.

License:GNU General Public License v3.0


Languages

Language:Python 96.8%Language:Batchfile 3.2%