By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,871 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

Control the CPU Utilization during Application Execution written C#.Net

P: n/a
Hi,

This is Govardhan, i am working on C#.Net.

I have a problem and i am sure most of them would have come across
this

problem. I have written a application in C#.Net. It does lot of work
so i know

it'll take time for the execution. But my problem is it starts
utilizing 98 to

100% of the CPU. I needed to know is there any way where in i can
control the

amount of CPU utilization for my application and restrict it to use
say some 60

-70% of the CPU. Actually when it starts utilizing 98 to 100% of the
CPU, i get

a feel that my system is hung-up, so i wanted to avoid this.

Is there any other solution to this problem.

If someone knows the solution for this problem then can u share it.

I am waiting for the response, this is my mail-id ap****@gmail.com

Thanks for the help and suggestions.

Regards,
Govardhana.

Apr 26 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"apondu" <ap****@gmail.comwrote in message
news:11*********************@u32g2000prd.googlegro ups.com...
Hi,

This is Govardhan, i am working on C#.Net.

I have a problem and i am sure most of them would have come across
this

problem. I have written a application in C#.Net. It does lot of work
so i know

it'll take time for the execution. But my problem is it starts
utilizing 98 to

100% of the CPU. I needed to know is there any way where in i can
control the

amount of CPU utilization for my application and restrict it to use
say some 60

-70% of the CPU. Actually when it starts utilizing 98 to 100% of the
CPU, i get

a feel that my system is hung-up, so i wanted to avoid this.

Is there any other solution to this problem.

If someone knows the solution for this problem then can u share it.

I am waiting for the response, this is my mail-id ap****@gmail.com

Thanks for the help and suggestions.
Look it up and see if it will work for you.

To set the processes priority:
Process.GetCurrentProcess().Priority = ProcessPriorityClass.BelowNormal;

To the thread priority:
Thread.CurrentThread.Priority = ThreadPriority.BelowNormal;

Apr 26 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.