File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Threads and Synchronization and the fly likes Thread Scheduling (Multiple CPU) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Thread Scheduling (Multiple CPU)" Watch "Thread Scheduling (Multiple CPU)" New topic

Thread Scheduling (Multiple CPU)

Armita Bansal

Joined: Aug 21, 2001
Posts: 8
Can I schedule threads on Multiple CPU. Is it OS Dependant or will atleast my JVM take care of it. (I am using a SUN JVM).
If this is possible, please lemme know how.. or atleast where i can start searching..
Thanks a zillion!!!
Peter den Haan
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Ordinary Java threads will use multiple CPUs in most JVM implementations, provided the JVM uses native threads instead of "green" threads.
- Peter
Armita Bansal

Joined: Aug 21, 2001
Posts: 8
thanks peter.. but can i force a thread scheduling if i want to specifically want my thread to run on a particular CPU?
I agree. Here's the link:
subject: Thread Scheduling (Multiple CPU)
It's not a secret anymore!