सभी किताबें

पेशेवर

ऐप्स परिचय Coach लॉग इन पढ़ना शुरू करें

Quantitative Finance · शब्दावली

ABA problem क्या है?

Definition 11.4 Low-Latency Software · अध्याय 11 — Lock-Free Programming

The ABA problem is the failure of a compare-and-swap to detect that a location changed from AA to BB and back to AA between the read and the CAS: the comparison succeeds although the state it was computed from (here, AA’s successor) is stale.

The ABA problem on a lock-free stack. The head is A both times thread 1 looks, so its compare-and-swap succeeds and installs B, which thread 2 has already removed. A tag incremented at every update makes the second A compare unequal. Data: ll_aba.aba, a deterministic replay.
Figure 11.2. The ABA problem on a lock-free stack. The head is A both times thread 1 looks, so its compare-and-swap succeeds and installs B, which thread 2 has already removed. A tag incremented at every update makes the second A compare unequal. Data: ll_aba.aba, a deterministic replay.
अध्याय में पढ़ें →