Lock-Free Data Structure

Noun · Development

Definitions

  1. A concurrent data structure that guarantees system-wide progress without using locks -- at least one thread makes progress in a finite number of steps regardless of what other threads do. Uses atomic compare-and-swap (CAS) operations. Avoids deadlocks and priority inversion but is notoriously difficult to implement correctly. Used in high-frequency trading, kernel data structures, and concurrent queues.

    In plain English: A data structure that multiple threads can use simultaneously without locks, guaranteeing no thread gets stuck waiting forever.

    Example: "The lock-free queue uses CAS to enqueue and dequeue -- even if one thread is preempted mid-operation, other threads continue making progress."

Related Terms