> Basically, you need some way of hooking into the scheduler, or know exactly
> what the other processes on the system are doing.
do i really need know what other processes are doing? Let's say I am
not concerned with current percentage, but only with a value I want it
to boost to.
ex. currently cpu%=50
I want to to raise it by 20%, and that is fine if some other processes
raise it by some value n during interupts....
All I care is to know that my call can raise it if there is a room.
That is all.
Jon Martin Solaas - 12 Feb 2006 09:58 GMT
>> Basically, you need some way of hooking into the scheduler, or know exactly
>> what the other processes on the system are doing.
[quoted text clipped - 9 lines]
> All I care is to know that my call can raise it if there is a room.
> That is all.
What exactly are you after? Boosting the jvm process scheduler priority?
You can use System.execute to run the renice command, but this won't
set a fixed cpu utilization, if the process is given low priority it'll
still consume 100% cpu if there aren't other processes in need of
cpu-cycles. Likewise, your process may be slowed down if it's
io-intensive, and won't be able to consume all cpu-cycles available.
Maybe you should look into a platform with realtime features, like
RT-Linux. And if you describe exactly what you need to do I'm sure
someone will be able to come up with much better answers than this :-)

Signature
jon martin solaas
Alun Harford - 13 Feb 2006 01:25 GMT
> > Basically, you need some way of hooking into the scheduler, or know exactly
> > what the other processes on the system are doing.
>
> do i really need know what other processes are doing? Let's say I am
> not concerned with current percentage, but only with a value I want it
> to boost to.
That's not the problem. The problem is that the scheduler can choose whether
or not to give you the CPU. The operating system controls the CPU, and can
simply not choose to run your code (too low priority, for example), so the
system won't get the load you want. If you're running in kernel mode you can
prevent yourself from being pre-empted.
Alun Harford
puzzlecracker - 16 Feb 2006 03:45 GMT
> > > Basically, you need some way of hooking into the scheduler, or know
> exactly
[quoted text clipped - 11 lines]
>
> Alun Harford
fine, cpu aside. Let me solve a simpler problem: in increase vm memory
heap in controlled fashion,
THanks