Reputation: 491
I've been writing an application for matrix multiplication.
I've got it done and watched resource monitor for comparison.
First of all
I've a i5 CPU. Dual core. 4 cores logical.
When I check Windows resource monitor, for multi thread app, CPU 0-1-2-3 use was almost 100%, again.
But in single thread app, CPU 0-1-2-3 was still using. Around same percentages, but not even close to 100%.
Here goes my question. When I was executing single threaded app, who was using the other cores? Of course any other process can use them. Or even "javaw.exe" itself (I told myself, it was multithreaded). But is there any possibility that JVM executes my single threaded process as multi threaded?
Upvotes: 0
Views: 484
Reputation: 73528
But is there any possibility that JVM executes my single threaded process as multi threaded?
No. The JVM will have multiple threads but it won't and can't just decide to multithread your program unless you create the threads yourself (or use some other multithreading mechanism like Executor
).
Upvotes: 1