I am new to linux field.
I have some confusion on use of spinlocks(in kernel mode) in various scenarios . Please clarify.
Spinlocks are used as busy waiting mechanisms.
1 ) Spinlocks( Uniprocessor + Non-preemptive kernel)--> Does not exist(since if you sleep while in spinlock it would cause a deadlock)
2) Spinlocks( Uniprocessor + Preemptive kernel)--> Should not be used as it waste resources.( what happens when the thread sleeps while holding the locks?? Can other processes execute as normal? )
3) Spinlocks( Multiprocessor + Preemptive kernel)--> Should be used Cautiously.( what happens when the thread sleeps while holding the locks?? Can other processes execute as normal? )
Please let me know if my understanding for above scenarios is right and please provide any extra info which would help me clarify the use of spinlocks.