On 12/9/2024 9:45 AM, Jonathan Scott wrote:
The ABA problem does not occur if a LIFO stack is being removed
all at once by a reading task which will then own it, so there
is no need for a counter in that case.

It occurs when an entry is being removed from a stack or queue
by changing the top of stack to the address of the next entry.
In that case, a counter with CDS is needed to ensure that the
entry has not been removed, processed and reused with a
different "next" pointer before the compare and swap.

Exactly! And all of this is discussed in the free pool manipulation examples in PoO, which date back to the S/370s!

--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/


--------------------------------------------------------------------------------
This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

Reply via email to