Portfolio/Kessels Algorithm

Kessels Algorithm

Three-Process Mutual Exclusion

Three-process mutual exclusion algorithm implementation in C++. Ensures that only one process can access a critical section at a time, preventing race conditions in concurrent systems. Uses shared variables and message passing to coordinate between three processes without deadlock or starvation.

View Code

Language

C++

Processes

3

Guarantees

Deadlock-free

Screenshots

Kessels Algorithm screenshot

Key Features

Mutual Exclusion

Only one layer winner proceeds to the second layer, ensuring exclusive critical section access.

Deadlock Freedom

Timeouts and tie-breakers force progress - if both contend, one flips the tie bit.

Starvation Freedom

Each contender eventually becomes the winner due to alternating tie-breakers.