If a critical section lock is currently owned by a thread and other threads are trying to own this very lock, then all the threads enter into a wait queue. When the initial owning thread releases the criticakl section lock, then one of the threads in the waiting queue owns the thread. kindly if i am told how the owner is decided as it is not guranteed that the thread that first came will be the owner of the thread.
if threads are not served in FIFO fashion then how the owner Thread from the queue is picked.