Re:A Close Look at a Spinlock
by chrisseaton on Saturday November 06, 2021 @08:25PM
(#29135205)
The OS schedules threads that it wants to run. When you consider which thread to schedule, don't schedule a thread that is waiting for a lock that isn't free yet.
[ Parent
| on HN ]
Re:A Close Look at a Spinlock
by sydthrowaway on Saturday November 06, 2021 @08:29PM
(#29135227)
Don’t you have to constantly check the status of the lock?
Re:A Close Look at a Spinlock
by chrisseaton on Saturday November 06, 2021 @08:33PM
(#29135254)
No, because if someone wants to release an OS lock they have to tell you.