The answer to your first question is the arguments for the second.
Spinlocks obtained by the kernel can be implemented by disabling preemption, as this ensures that the kernel completes its critical section without the intervention of another process. The whole point is that another process will not be able to work until the kernel releases the lock.
There is no reason for this to be implemented in this way; this is just an easy way to implement it and does not allow any process to spin on the lock held by the kernel. But this trick only works if the kernel has acquired a lock: user processes cannot turn off the continuity, and if the kernel rotates (i.e., it tries to get a spin lock, but another process already holds it), itโs better to leave guess on! Otherwise, the system will hang, because the kernel is waiting for a lock that will not be released, because the process holding it cannot release it.
A kernel acquiring a spin lock is a special case. If a user-level program acquires a spin lock, then prevention will not be disabled.
source share