Re:Lamport's Bakery Algorithm, Demonstrated in Python
by somat on Saturday January 20, 2024 @08:34PM
(#39074559)
But it's not in a distributed environment, it is a shared memory environment. That is the whole point. If it were a distributed environment the processes would not have to worry about smashing each others memory because they would not share memory in the first place.
[ Parent
| on HN ]
Re:Lamport's Bakery Algorithm, Demonstrated in Python
by Dylan16807 on Saturday January 20, 2024 @08:54PM
(#39074687)
Most shared memory environments are distributed, at least to some extent. The process ID is not an issue, you can do the equivalent in a distributed environment just fine. But the algorithm depends on strict memory ordering, and that's much harder to provide than atomic writes. Most shared memory systems don't offer it.