I know only one thread will get the monitor lock. But what happens to all the other wait() ing threads at the low level ? ( Since they are all notified ) Will they all wake up and enter some kind of expensive spin lock ? Or will they go back to being blocked on teh lock again ? Looking for the low level details - particularly trying to see if CPU will be consumed as a result of this ?
Also when a thread is waiting on a monitor, is the actual OS thread taken away from it behind the scenes ? ( So that the OS thread can be used to do useful work )