File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes Question about multithread and dual core processor Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Question about multithread and dual core processor" Watch "Question about multithread and dual core processor" New topic
Author

Question about multithread and dual core processor

Tanakorn Numrubporn
Ranch Hand

Joined: Dec 11, 2006
Posts: 81
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
Marshal

Joined: Jul 08, 2003
Posts: 24054
    
  13

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.


[Jess in Action][AskingGoodQuestions]
Tanakorn Numrubporn
Ranch Hand

Joined: Dec 11, 2006
Posts: 81
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
Marshal

Joined: Jul 08, 2003
Posts: 24054
    
  13

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

Joined: Dec 11, 2006
Posts: 81
Thank you
Your reply is very useful for me
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about multithread and dual core processor
 
Similar Threads
basic question...
Java program for fibanocci using Java threads
Mac Book Pro - Suggestions needed
Problem with Program on Dual processor
* Welcome Cory Isaacson