Job Objects + CPU throttling + .NET

  • Thread starter Thread starter Lu
  • Start date Start date
L

Lu

hi. Anyone have an example or tips on on how to do CPU throttling using Job
Objects with VB.NET ? The documentation on this is close to nothing.

So far I have been able to:
1- create a job object (using CreateJobObject)
2- Assign the process to the job object (using AssignProcessToJobObject)
3- Limit the jobs CPU time by using
JOBOBJECT_BASIC_LIMIT_INFORMATION.PerJobUserTimeLimit (using
SetInformationJobObject). This last part doesn't seem to work because based
on what I have read the process should be killed when reaching x amount of
cpu time.

I am pretty sure #3 isn't the real way to do CPU throttling since the
process shouldn't be killed. I think it should involve
JOBOBJECTINFOCLASS.JobObjectBasicAccountingInformation somehow but i'm can't
seem to find any documentation on how to do this.

thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top