Which process gets spinlock when multiple processes are trying to get
I am trying to understand the spinlock concept. But I have a question on it, if more than one process is trying to get a spinlock which process gets the lock.
Process A -- acquired spinlock on Resource R1
Process B -- spinning on R1
Process C -- spinning on R1
Process A -- released R1 by spin_unlock
Now, which process will get lock for R1 either B or C?
I understand B will acquire lock for R1.
Please correct me if my understanding is wrong. Thanks in advance.