Is there a way to get the JVM to run on the same processor or core

In Java, there is a way to get a JVM instance running on the same CPU / Core.

Also, is there a way for a given thread to find out which processor it is running on?

+3
source share
2 answers

This should not be controlled at the JVM / Java level, but at the OS / platform level. On Windows, for example, you can go to the "Processes" tab in the task manager and set up "Affinity" for most processes by selecting the appropriate option in the right-click menu. In doing so, you basically control which processors / cores can process the process.

+5
source

JVM Core.

. .

Java JVM CPU/Core.

.

, , ?

. (, , , Java...)

, , Java. , JNI API- . GUI .

+1

Source: https://habr.com/ru/post/1743823/


All Articles