From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Lock-Free stack in Ada SPARK
Date: Sun, 12 Feb 2017 13:49:36 +0100
Date: 2017-02-12T13:49:36+01:00 [thread overview]
Message-ID: <o7pll9$1juv$1@gioia.aioe.org> (raw)
In-Reply-To: 077a224f-4836-4c05-89f1-3f6fbee61427@googlegroups.com
On 2017-02-12 13:26, Hadrien Grasland wrote:
> Le samedi 11 février 2017 20:36:31 UTC+1, Jeffrey R. Carter a écrit :
>> Perhaps someone will enlighten me.
>>
>> All of the lock-free structures that I've looked at involved busy waiting on a
>> memory location via an atomic test-and-set/compare-and-swap operation.
>>
>> To my mind, that's an implementation of a lock, and I don't understand why these
>> are considered lock free.
>
> A lock-free object is an object that can be concurrently manipulated
> by multiple threads, in such a fashion that any thread can fall asleep
> permanently at any point in time without preventing other threads from
> doing useful work.
As a counterexample consider an atomic integer. Is it lock-free? Not
according your definition, because there might be a thread waiting
integer to become 123 while nobody writes that value there.
-------------------
It is correct to say that synchronization is achieved per busy waiting
on lock-free shared objects. After all there is no other choice, a task
that cannot continue must either be blocked or else retry.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2017-02-12 12:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-11 3:07 Lock-Free stack in Ada SPARK stevenselectronicmail
2017-02-11 9:57 ` Hadrien Grasland
2017-02-11 10:07 ` Hadrien Grasland
2017-02-11 10:08 ` Hadrien Grasland
2017-02-11 10:14 ` Hadrien Grasland
2017-02-11 17:34 ` stevenselectronicmail
2017-02-11 19:36 ` Jeffrey R. Carter
2017-02-11 20:42 ` stevenselectronicmail
2017-02-11 22:40 ` Dmitry A. Kazakov
2017-02-11 23:02 ` stevenselectronicmail
2017-02-12 8:30 ` Dmitry A. Kazakov
2017-02-12 12:26 ` Hadrien Grasland
2017-02-12 12:49 ` Dmitry A. Kazakov [this message]
2017-02-12 13:19 ` Hadrien Grasland
2017-02-12 14:57 ` Dmitry A. Kazakov
2017-02-12 13:04 ` Hadrien Grasland
2017-02-12 22:25 ` Robert Eachus
2017-02-13 8:22 ` Dmitry A. Kazakov
2017-02-13 20:04 ` stevenselectronicmail
2017-02-21 1:51 ` Robert Eachus
2017-02-21 8:44 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox