Let n {\displaystyle n} be the number of processes. Each process is identified by an integer in 1 , . . . , n {\displaystyle 1,...,n} .
Each process maintains one data structure:
The token contains two data structures:
When process i {\displaystyle i} wants to enter the CS, if it does not have the token, it:
When process i {\displaystyle i} leaves the CS, it:
When process j {\displaystyle j} receives a request from i {\displaystyle i} with sequence number s {\displaystyle s} , it:
A process enters the CS when it has acquired the token.
The main design issues of the algorithm:
Ichiro Suzuki, Tadao Kasami, [1], ACM Transactions on Computer Systems, Volume 3 Issue 4, Nov. 1985 (pages 344 - 349) https://dl.acm.org/doi/pdf/10.1145/6110.214406 ↩
Ricart, Glenn, and Ashok K. Agrawala. "An optimal algorithm for mutual exclusion in computer networks." Communications of the ACM 24.1 (1981): 9-17. https://apps.dtic.mil/sti/pdfs/ADA083268.pdf ↩