Todos los libros

Profesional

Apps Acerca de Coach Iniciar sesión Empezar a leer

Computer Science · Glosario

¿Qué es Lock-free, wait-free, ABA problem?

También llamado: lock-free · wait-free · ABA problem

Definition 13.11 University Computer Science — Year 3 · Capítulo 13 — Concurrency: Deadlock, Monitors and Lock-Free Structures

An implementation of a shared object is lock-free if, whenever threads are running its operations, some operation completes after a finite number of steps of the system, whatever the scheduling. It is wait-free if every operation completes in a finite number of its own thread’s steps. The ABA problem arises when a thread reads a value A, then between its read and its CAS other threads change A to B and back to A: the CAS succeeds when it should not.

The ABA problem in three snapshots. Thread 1’s CAS compares only the head, A, and swings it to the successor it read in snapshot 1. B is now on the stack and in thread 2’s hands at once.
The ABA problem in three snapshots. Thread 1’s CAS compares only the head, A, and swings it to the successor it read in snapshot 1. B is now on the stack and in thread 2’s hands at once.
Leer en el capítulo →