praveen bhushan

Greenhorn
+ Follow
since Feb 23, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by praveen bhushan

Steve Luke wrote:Hi Praveen,

If you use multiple threads in current Java implementations, then if your computer has 4 cores those threads will be distributed to where there is extra processor cycles. So if you have four tasks then they can get distributed to all 4 cores. That doesn't necessarily mean they will get spread out to all four cores, just that they could be if needed to be.

So I have a question: Do you absolutely need to use 1 thread per core? Why? Why not just take the cycles as they come available from any of the cores?

Making sure your app takes up 100% of a cores cycles is not as easy as you might thing - and it is never a good thing, especially not to do it intentionally just to spread your threads out to multiple cores.




Hii Steve, thanks for your suggestion . Actually my professor is telling me to do it. Is it possible to run one thread per processor. I think its a tedious job to do and moreover its risky I guess.
As we know that quad core processor has four processors, so keeping that in mind I need a program in java wherein we can use the concept of running multiple threads simultaneously in four different processor...In this case four different threads in four different processor....I somewhere read that to implement this we need to utilise 100% resource of each processor...basically its a kind of multi tasking.....please help me out as it is necessary for my project...any kind of help is most welcome....