Building Working Spin Locks with Test-And-Set
In this lesson, you will learn the correct implementation of a lock, the test-and-set method.
We'll cover the following
Because disabling interrupts does not work on multiple processors, and because simple approaches using loads and stores (as you saw in the previous lesson) don’t work, system designers started to invent hardware support for locking. The earliest multiprocessor systems, such as
Test and set
The simplest bit of hardware support to understand is known as a test-and-set (or
Get hands-on with 1400+ tech skills courses.