Peterson's algorithm implementation on Linux