Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Threading On A Multicore Machine  RSS feed

 
Lennie De Villiers
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I've got a multi-core machine (2.5GHz x 2) how are threads handled in the JVM in this case? Are they parallel?

Thanks
 
Harpreet Singh janda
Ranch Hand
Posts: 317
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it depends on OS not only the hardware.
Because Thread scheduling is Dependent on Operating System where the program is running

We can't force the scheduler to put a thread on one core and other thread on other core.

I am new in java world. Please correct mt if i am wrong.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All modern OSes know how to take advantage of multi-core CPUs; it's more likely to depend on whether the process (the JVM in this case) knows how to take advantage of the OS's multi-core support.

This isn't part of the exam, though, so I'll move it to a more suitable forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!