help regarding 'thread allocation to cores' - in hotspot jvm

ddmetro puzzlesdj at gmail.com
Sat Nov 27 05:14:01 PST 2010


Thanks Ramakrishna.

I have modified the hotspot code, to alternately schedule threads on one of
the two cores on my dual-core machine using the linux system call -
pthread_setaffinity_np(). 

I also have a java program - that creates two threads - each of which print
infinitely. With this as the input program to the hotspot code, I am
expecting the 'System Monitor' to show equal loads(CPU Utilization) on both
the cores. However, both the cores are being utilized equally - (i) without
the code changes as well as (ii) with the code changes.


1. I am trying to come up with a test case (input java program), that
performs well with my code (both cores being utilized) and performs less
efficiently (under utilization of cores) when run without my changes.

2. I am trying to switch off OS level scheduling to show that my code
changes improve the utilization of cores. 

Question: Kindly direct me, as to which of the above mentioned two
approaches should I proceed with? 

Also, I tried switching off OS level scheduling in linux (ubuntu), but I am
still struggling to figure it out. Kindly provide pointers as to how to
proceed with it.

OS: Linux Ubuntu 10.04

Thanking You for your time and patience,
Dhiraj P.

-- 
View this message in context: http://old.nabble.com/help-regarding-%27thread-allocation-to-cores%27---in-hotspot-jvm-tp30271610p30318328.html
Sent from the OpenJDK Hotspot Compiler Development List mailing list archive at Nabble.com.



More information about the hotspot-compiler-dev mailing list