If no priority is given, whoever comes first will acquire the lock.
While mutual exclusion
may provide safety
property, it does not ensure liveness
property. There can be cases where a thread keeps coming first to acquire the lock, resulting in starvation
(other threads wait forever because someone keeps occupying).
Google with the keywords highlighted will help you understand more. I found these slides really comprehensive http://www.cs.cornell.edu/Courses/cs414/2004su/slides/05_schedule.pdf