Life consists not in holding good cards but in playing those you hold well. Josh Billings

System throughput S ( rate at which the system executes requests for the CS )
| S = | 1 -------- Sd + E |
Si -- site, N sites
each site maintains a request set

Performance
for each CS invocation
(N-1) REQUEST (N-1) REPLY (N-1) RELEASE total 3(N-1) messages synchronization delay Sd = average delay
request sets
Ri ∩ Rj ≠ ∅ all i, j ∈ N
Properties:
Maekawa found that:
or K = |Ri| ≈ √N
Messages exchange:
| Failed -- F, Sj cannot grant permission to Sk because Sj has granted permission to a site with higher request priority. | ![]() |
| Inquire -- I, Sj wants to find out if Sk has successfully locked all sites. | ![]() |
| Yield -- Y, Sj yields to Sk | ![]() |
Algorithm:
Example
13 nodes, 13 = 4(4-1) + 1, thus K = 4
suppose sites 11, 8, 7 want to enter CS; they all send requests with sequence number 1.
diagram
11, 7, 8 are circularly locked:
diagram
FCFS
Example:
There are three processes, p1, p2, and p3.
p1 and p3 seek mutually
exclusive access to a shared resource.
Initially: the token is at p2 and the token's state is LN = [0, 0, 0] and Q empty;
p1's state is: n1 ( seq # ) = 0, RN1 = [0, 0, 0];
p2's state is: n2 = 0, RN2 = [0, 0, 0];
p3's state is: n3 = 0, RN3 = [0, 0, 0];
Comparison of Lamport and Suzuki-Kazami Algorithms
The essential difference is in who keeps the queue. In one case every
site keeps its own local copy of the queue. In the other case,
the queue is passed around within the token.
sites are arranged logically as a tree ( e.g. minimal spanning tree ) edges are directed toward the site that holds the token
each site has a variable HOLDER -- indicates the location of TOKEN relative to the site ( node ) itself

HOLDER(A) = D HOLDER(B) = A HOLDER(C) = A HOLDER(D) = E HOLDER(E) = self HOLDER(F) = D

USING
REQUEST_Q
ASKED

Performance