News for hackers. Stuff that matters.
Re:Lamport's Bakery Algorithm, Demonstrated in Python by valray on Saturday January 20, 2024 @02:30PM (#39071340)
Ah, yes, that would work.

But then there is reliance on an underlying platform to resolve the conflict by providing a globally unique identifier. Instead of process ID, there is the IP address mechanism.

So it's turtles all the way down, if I understand correctly.

Re:Lamport's Bakery Algorithm, Demonstrated in Python by eigenvalue on Saturday January 20, 2024 @02:35PM (#39071395)
Not really. Each process could, at the beginning, generate a random nonce and broadcast it and thereafter use that as its tiebreaker number. The point is to just have a consistent way to break ties that is convenient to implement in whatever domain you’re working in. And in a networked domain, without a valid IP address, the worker isn’t going to be doing much in the process anyway since it wouldn’t be able to communicate at all.