operating-system-tsl.html


* created: 2025-07-06T17:30
* modified: 2025-07-06T21:54

title

Test and Set Lock

description

The TSL Command can be used to ensure exclusive access to a value. This is done by writing the value into a know register and replacing the value in its current position with a 1 (locked).

related notes

Test and Set Lock

This instruction loads the current value at the specified address into the accumulator, if it is equal to zero pierced, else check again.

This potentially infinite loop has some pretty significant trade offs, see active waiting.