• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about multithread and dual core processor  RSS feed

 
Tanakorn Numrubporn
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May anyone explain to me about JVM on dual core processor? Is jvm native support for dual core?
Please suggest some books or article on the web that I can find information about this topic.

Thank you
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

Modern JVMs leave it up to the OS to schedule threads. If the OS supports the multicore processor properly, and can schedule parallel threads on the multiple cores, then your JVM can take advantage of it. The JVM is no different from any other program in this regard.

Not sure what sort of additional documentation you'd like to see; you won't find anything.
 
Tanakorn Numrubporn
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
glad to meet this java community.
thank you for reply.

If I want to develop parallel computation program to run on dual-core architecture, is it have to make a "special thing" on this architecture that difference from the ordinary "real" multi-processor?.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, in either case you can just write a program with several concurrent threads and expect them to run simultaneously on different processors or cores.
 
Tanakorn Numrubporn
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
Your reply is very useful for me
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only real difference is if you want to optimize your program, you might actually ask the OS if there are multiple CPUs present, and only spawn extra threads if they are actually multiple CPUs. But its not really necessary.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!