Michael Schnell schrieb:
On 06/27/2011 04:58 PM, Andrew Brunner wrote:
You're totally underestimating the need for a memory barrier :
While I do know that memory barriers are the way to go to avoid the expensive use of Mutex and friends, I am positive that an MB is not necessary if all accesses to something are protected by a Mutex

You forget the strength of protection. A MB will disallow immediately any concurrent access to the memory area - no way around. Protection by other means only can work in *perfect* cooperation, a very weak model.

Furthermore a MB still requires management by other means (MUTEX...), to prevent deadlocks. Unless the MB will block *any* activity on *all* the critical program data at once, what would lead to single-thread behaviour of the program.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to