Home > Back-end >  Two questions about spin locks
Two questions about spin locks

Time:02-20

1. The spin spin lock lock said many bloggers don't release the CPU, so how the lock is released? If has been inside the while loop, how other thread preemption CPU?
2. Some bloggers say will not cause the CPU context switch, from user mode to kernel mode, I don't understand the same process need to switch user mode and kernel mode, this is the process of how to avoid other preempt the CPU, a context switch?
  • Related