xxAS wrote:Any of the general Java programming forums, or the concurrency forum. But I'll drag into real-time relevance :)
Well I know that it isn't any realtime system, but I didn't know where to put this article.
This error happens only sometimes, but cpu-usage is still less than 15%.You're executing on a time-sharing scheduler that operates across all threads in the system, including system tasks. Your Java threads can be forced off CPU at any time and for a length of time that depends on the complete system load at that time. Any system tasks have higher priority than your Java threads, so it doesn't take much activity to displace the JVM. In a real-time JVM you can assign priorities that allow you to be as high-as or higher than system tasks so you get greater scheduling control and won't be pushed off CPU (unless you're blocking on shared resources).