Overview

LL/SC is an alternative to Compare-and-Swap (CAS) used primarily in RISC architectures (like ARM, MIPS, and PowerPC).

How it Works

  1. Load-Link (LL): Reads a value from memory and 'monitors' that address.
  2. Store-Conditional (SC): Tries to write a new value to the same address. The write only succeeds if no other processor has modified that address since the LL instruction.

Advantage

Avoids the 'ABA problem' inherent in simple CAS operations without requiring extra tags or version numbers.

Related Terms