3 ms·
compare-and-swap instruction itself may not be privileged operation but user space spin-lock seldom work in user-space (it's dangerous at least), because a user
by tsu 12y ago
compare-and-swap instruction itself may not be privileged operation but user space spin-lock seldom work in user-space (it's dangerous at least), because a user thread could be preempted.
- jacquesm 12y agoWhat's even more dangerous, on a single core machine or one that is lightly loaded without any aggressive contention for the lock it may even seem to be working.
- michaelmior 12y agoAh yes, good point. I had forgotten about that issue.