Alok Kumar
Alok Kumar

Reputation: 101

Running processes on different cores

I have some java classes(blackbox) which I call through jni from native C code. There are 4 parallel threads in my native code which need to be running always and they call some java classes occasionally, but these classes run really slow. I am of the opinion that threads run on a single core and using multiple cores can solve my issue (crashing). I would like to run java environment in the background, the 4 native code threads on one core, and the java lasses if called should run on a separate core independent of the operations of the native code. Please tell me if I'm on the right track and let me know the possible way I can proceed.Thanks in advance.

Upvotes: 1

Views: 208

Answers (1)

abhati
abhati

Reputation: 307

You cannot explicitly assign which core to execute your thread on,however you can assign priorities and affinities to threads.

A possible duplicate of this.

Upvotes: 1

Related Questions