Mutual exclusion implementation using token-ring algorithm