{
  "id": 20541297,
  "title": "FreeBSD GUS",
  "url": "https://urgent.news/2026/11/18/freebsd-gus",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-18T02:54:59.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://gregoire.dev/writing/gus/"
  },
  "original_language": "en",
  "account": "FreeBSD utilizes a safe memory reclamation scheme called GUS, which stands for Global Unbounded Sequences. This scheme is part of the Epoch-based reclamation (EBR) family, a solution to the problem of safe memory reclamation (SMR) in lock-free data structures. SMR is crucial for modern scalability in operating systems, as lock-free data structures offer higher throughput but also come with their own complexities, such as managing object liveness and ensuring memory is freed only if no one accesses it.\n\nSMR schemes can be broadly categorized into Epoch-based reclamation (EBR) and Quiescent-state based reclamation (QSBR). QSBR, also known as RCU (Read-Copy-Update) in Linux, was invented by Paul McKenney for the DYNIX operating system. RCU's core operations include rcu_read_lock, rcu_read_unlock, and rcu_synchronize, which guard reads around potentially-freed memory and wait for all CPUs to pass through a quiescent point.\n\nFreeBSD's GUS scheme tackles the first issue of unbounded epochs and, through clever integration with the broader system, addresses issue #2 of amortizing polling. GUS relies on a global monotonically increasing write sequence and a global read sequence representing the last minimum observed sequence across CPUs. Each CPU keeps track of its own local sequence when it is pinned. The algorithm ensures that a sequence acts as a timestamp and that the read sequence always plays catch-up with the write sequence, maintaining a separation of at least one between them.\n\nA distinguishing feature of GUS is its seamless integration with the UMA (universal memory allocator) allocator, which is a modernized slab allocator. Originally implemented in Solaris, Jeff Bonwick's papers describe the allocator's design. The UMA allocator relies on per-CPU buckets (magazines) and a depot of pre-allocated buckets to efficiently manage memory allocation and deallocation in an SMP (symmetric multiprocessing) system. The size of the buckets is dynamically resized according to system needs.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}