Re:There's No Such Thing as “Implicitly Atomic”
by bregma on Thursday October 05, 2023 @01:50PM
(#37781687)
So FreeBSD can run only on simple single 32-bit CPUs with no cache (or no registers)? I would argue that outside of a few select embedded controllers there's almost no hardware out there that meets that requirement.
[ Parent
| on HN ]
Re:There's No Such Thing as “Implicitly Atomic”
by Dylan16807 on Thursday October 05, 2023 @01:59PM
(#37781807)
What do you mean?
Caches don't break atomicity.
Re:There's No Such Thing as “Implicitly Atomic”
by sapiogram on Thursday October 05, 2023 @02:56PM
(#37782613)
You're confusing atomicity with sequential consistency. The former guarantee is perfectly compatible with caching.
Re:There's No Such Thing as “Implicitly Atomic”
by loeg on Thursday October 05, 2023 @04:49PM
(#37784126)
No, you’re making an unstated bogus assumption somewhere but I’m not sure which one.
Re:There's No Such Thing as “Implicitly Atomic”
by bregma on Tuesday October 10, 2023 @12:02PM
(#37833902)
It's the assumption that the hardware operation is the same as the C abstract machine operation.
Hint: they're not, and that causes all kinds of subtle problem when programmers assume they are, especially when it comes to atomicity. The compiler caches a value in a register and two threads synchronize on that value? Boom. Or maybe no boom when one was expected.