The Suzuki-Kasami algorithm is a token-based algorithm for achieving mutual exclusion in distributed systems. The process holding the token is the only process able to enter its critical section.
Contents
- Algorithm description
- Data structures
- Requesting the critical section CS
- Releasing the CS
- Receiving a request
- Executing the CS
- References
This is a modification to Ricart–Agrawala algorithm in which a REQUEST and REPLY message are used for attaining the critical section. but in this algorithm they introduced a method in which a seniority vise and also by handing over the critical section to other node by sending a single PRIVILEGE message to other node. So, the node which has the privilege it can use the critical section and if it does not have one it cannot. If a process wants to enter its critical section and it does not have the token, it broadcasts a request message to all other processes in the system. The process that has the token, if it is not currently in a critical section, will then send the token to the requesting process. The algorithm makes use of increasing Request Numbers to allow messages to arrive out-of-order.
Algorithm description
Let
Data structures
Each process maintains one data structure:
The token contains two data structures:
Requesting the critical section (CS)
When process
Releasing the CS
When process
Receiving a request
When process
Executing the CS
A process enters the CS when it has acquired the token.