I am learning concurrency in java, and I could not find a clear explanation on, how does the synchronization process work under the hood, for the thread the holds the lock, and for the threads that are waiting for it.
Let's only consider the thread that is running in a critical section and has the lock, which one of the following is correct?
A) JVM let the thread go all the way down to finish the synchronized section without interruption/suspension.
B) The thread might be still suspended as scheduled by the system, but because it is suspended when holding the lock, other threads that are scheduled to run now, cannot execute synchronized [with the same monitor] parts of the code?
Thanks in advance for any help.