I'm a developer working a lot with Android Studio. When it compiles the Java classes it spins up 4+ threads of CPU intensive work. Often I play music in the background when that goes on. Here's what happens:
- The music skips or completely stops at the most intensive section of the compilation
- The mouse point jitters or stops responding altogether
Most often things normalize after compilation is done, but other times the computer freezes totally and I have to hard reset it. How come? Is not Linux/Ubuntu/Unity designed to prioritize the UI thread? How does it allow Java to take 100% of the CPU resources? Is there any way I can throttle this?
Disclaimer: I don't know much about OS code.