Todos los libros

Profesional

Apps Acerca de Coach Iniciar sesión Empezar a leer

Quantitative Finance · Glosario

¿Qué es ABA problem?

Definition 11.4 Low-Latency Software · Capítulo 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.
Leer en el capítulo →