# Suzuki Kasami Algorithm Assignment Help

• Broadcast the request for that token
• Process using the token sends this towards the requestor in the event that it doesn't require it

## Suzuki Kasami Algorithm Issues

• Current versus outdated requests
• determining sites along with pending requests
• deciding that site to provide the actual token to

### The token:

• Queue ( FIFO ) Q of requesting processes
• LN[ 1..n ] : sequence number of request that j executed most recently

### The request message:

REQUEST( i, k ): request message from node i for its kth critical section execution

### Other data structures

RNi[ 1..n ] for each node i, where RNi[ j ] is the largest sequence number received so far by i in a REQUEST message from j.

## To request critical section:

• If i doesn't have token, increment RNi[ i ] as well as send REQUEST( i, RNi[i] ) to any or all nodes
• if i has token already, enter critical section when the token is actually idle, otherwise follow rule to release critical section

## On receiving REQUEST( i, sn ) fat j:

• set RNj[ i ] = max( RNj[i], sn )
• if j has the token and the token is idle, send it to i if RNj[ i ] = LN[ i ] + 1. If token is not idle, follow rule to release critical section

### To enter critical section:

• enter CS if token is present

### To release critical section:

• set LN[ i ] = RNi[ i ]
• For every node j that is not really within Q (in token), include node j to Q if RNi[ j ] = LN[ j ] + 1
• If Q is non empty after the above, delete first node from Q as well as send the token to that node