Spinlock vs. Mutex

It’s very interesting to compare the active waiting of a spinlock with the passive waiting of a mutex. Let's continue our discussing from the previous lesson and make a comparison between these two.

What will happen to the CPU load if the function workOnResource locks the spinlock for 2 seconds (lines 24 - 26)?

Get hands-on with 1200+ tech skills courses.