Java Scheduling mechanism regarding I/O threads
<p>From <a href="https://stackoverflow.com/a/19982612">this answer</a>, I understand that when java threads wait for I/O, they're in the RUNNABLE state.</p>

<p>This confuses me, because from what I understood the java scheduler slices CPU resources equally between all the RUNNABLE threads (let's ignore priority for that matter).</p>

<p>To demonstrate what's bugging me, consider that following:
My process has 1000 threads. 999 of these are waiting for I/O which will take some time to finish. The one left thread only does CPU calculations.</p>

<p>All these 1000 threads are in the RUNNABLE state, meaning time will be sliced equally between them. This will cause the 1 thread to be given only 0.1% CPU which is absurd (when no other thread actually needs the CPU).</p>

<p>I realize that there's something I miss here, but cannot figure out what it is?
Is there an additional mechanism to handle I/O CPU time consumption?</p>