Jump to content

Talk:Atomic updates: Difference between revisions

Why transfer?
(reply)
(Why transfer?)
Line 2:
 
: I'm sorry, but I don't understand the distinctions you're making. How is the transfer operation unsafe? If you're just concerned about the nonnegative requirement, I've revised the task to include what my E implementation actually does. The difference between this task and [[mutex]] is that this task does not explicitly require the use of a mutex; my E example does not use a mutex, and it could also be implemented using, for example, [[wp:software transactional memory]]. The purpose of this task is to demonstrate a basic task in concurrency: ensuring that a data structure preserves its invariants in the presence of concurrent access. --[[User:Kevin Reid|Kevin Reid]] 15:17, 17 May 2009 (UTC)
 
:: Save = preserves object's integrity (invariant). E.g. sum of the bucket's values. Since a transfer of values cannot be implemented as an independent safe operation, it is unclear why it is required. My Ada solution provides atomic updates that preserve the object's invariant (sum). Can you explain why is it an incorrect solution? --[[User:Dmitry-kazakov|Dmitry-kazakov]] 15:36, 18 May 2009 (UTC)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.