I have created a simple program in java:
public static void main(String[] args) throws InterruptedException {
while (true)
;
}
If I run this on a Linux machine, it shows 100% CPU usage, but doesn't cause the OS to appear slow. However, if I run the exact same code on Windows, it only shows about 20% CPU usage.
I am using Oracle JRE on Windows and OpenJDK 6 on Linux.
I'm wondering if Windows' scheduler preempt threads randomly and Linux's doesn't?