[concurrency-interest] a question regarding blocking threads
dl at cs.oswego.edu
Tue Jul 5 12:25:01 EDT 2005
Yechiel Feffer wrote:
> Is there any mechanism that JVMs use in order to minimize (as much as
> possible) swaping threads that are locking ? If such threads are
> swapped, it will cause starvation of other threads waiting for the
> locked monitors. Or is a kernel level problem ?
This is usually mainly done in the converse sense by
preferentially blocking threads that are failing to
obtain locks. Plus programmers should nomrally avoid taking
actions that definitely block threads (I/O, acquiring
other locks, etc) while holding locks.
More information about the Concurrency-interest