Operating systems notes

Hardware Primitives & Lock-Free Programming

What is really under the lock, the atomic CPU instructions that make mutual exclusion possible, and the expert art of doing without a lock at all. Every section is a drawn page beside a clear written explanation, about 17 minutes in all.

  • Chapter 17 of 37
  • About 17 minutes
  • 7 sections

Sign in with Google or GitHub and you land straight on this page. DSA comes with the all labs plan and every ChaiCode batch.

The first drawn page of Hardware Primitives & Lock-Free Programming: Under the lock: why software alone is not enough
The chapter's first page: Under the lock: why software alone is not enough

In this chapter

  • Under the lock: why software alone is not enough
  • Test-and-set and the atomic exchange
  • Compare-and-swap: the workhorse
  • Atomic variables: language-level tools
  • The memory model: reordering, barriers, and acquire/release
  • Lock-free and wait-free: the honest trade-off
  • Why engineers care: where atomics earn their keep

Next chapters

Read the whole chapter

Sign in and the chapter opens with every drawn page, and all 38 operating systems chapters beside it.

DSA comes with the all labs plan and every ChaiCode batch.