Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Quantitative Finance · Glosarium

Apa itu ABA problem?

Definition 11.4 Low-Latency Software · Bab 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.
Baca dalam konteks →