Skip to content

Compare-and-swap (CAS)

Defined in 2 lectures. Each definition is in that lecture's terms.

Definitions are written by AI from each lecture’s transcript. The time opens the lecture where the lecturer explains it.

  • An atomic operation that sets a variable to a new value if and only if its current value equals a specified old value.
    15:30LinearizabilityMartin Kleppmann · University of Cambridge
  • An atomic operation that compares the contents of a memory location to a given value and, only if they are the same, modifies the memory location to a given new value.
    1:07:24Synchronization Without LocksCharles Leiserson · MIT