2 ms·
How does this handle the case where a waiting process is killed before the lock becomes available? Is there a kernel cleanup procedure at process destruction
by nkurz 13y ago
How does this handle the case where a waiting process is killed before the lock becomes available? Is there a kernel cleanup procedure at process destruction as a backstop?
- caf 13y agoSpinlocks are only used for low-level locking, and held for very short periods. A killed process won't die while spinning on a spinlock (or while holding one, of course) - it will find out the next time it goes into an interruptible wait or returns to userspace.