I'm looking to write a program that operates at the lowest execution
priority possible. That is, I want the program to basically run in the
background having as little impact on the performance of computer system as
possible. The program will do some background backup tasks.
I'm reasonably sure that the first step is to create a thread, and to assign
the thread the lowest execution priority possible. Are there any other
techniques, advice, tricks, etc. that I should be aware of? Are there any
good examples or tutorials that anyone knows of?
TIA,
Richard Rosenheim 5 1889
Just run your process with the ProcessPriorityClass.Idle.
Willy.
"Richard L Rosenheim" <ri*****@rlr.com> wrote in message
news:e2*************@TK2MSFTNGP10.phx.gbl... I'm looking to write a program that operates at the lowest execution priority possible. That is, I want the program to basically run in the background having as little impact on the performance of computer system as possible. The program will do some background backup tasks.
I'm reasonably sure that the first step is to create a thread, and to assign the thread the lowest execution priority possible. Are there any other techniques, advice, tricks, etc. that I should be aware of? Are there any good examples or tutorials that anyone knows of?
TIA,
Richard Rosenheim
Thanks for the reply. One other question -- is it possible (or even
advisable) to set the priority of the actual program to idle, or must/should
I spawn a separate thread in which I set that thread's priority to idle?
Richard Rosenheim
"Willy Denoyette [MVP]" <wi*************@pandora.be> wrote in message
news:O8**************@TK2MSFTNGP11.phx.gbl... Just run your process with the ProcessPriorityClass.Idle.
Willy.
"Richard L Rosenheim" <ri*****@rlr.com> wrote in message news:e2*************@TK2MSFTNGP10.phx.gbl... I'm looking to write a program that operates at the lowest execution priority possible. That is, I want the program to basically run in the background having as little impact on the performance of computer system as possible. The program will do some background backup tasks.
I'm reasonably sure that the first step is to create a thread, and to assign the thread the lowest execution priority possible. Are there any other techniques, advice, tricks, etc. that I should be aware of? Are there
any good examples or tutorials that anyone knows of?
TIA,
Richard Rosenheim
Richard,
No, just grap the CurrentProcess and set it's prioryty class to Idle.
....
Process currentProcess = Process.GetCurrentProcess();
currentProcess.PriorityClass = ProcessPriorityClass.Idle;
....
Willy.
"Richard L Rosenheim" <ri*****@rlr.com> wrote in message
news:OI**************@TK2MSFTNGP12.phx.gbl... Thanks for the reply. One other question -- is it possible (or even advisable) to set the priority of the actual program to idle, or must/should I spawn a separate thread in which I set that thread's priority to idle?
Richard Rosenheim
"Willy Denoyette [MVP]" <wi*************@pandora.be> wrote in message news:O8**************@TK2MSFTNGP11.phx.gbl... Just run your process with the ProcessPriorityClass.Idle.
Willy.
"Richard L Rosenheim" <ri*****@rlr.com> wrote in message news:e2*************@TK2MSFTNGP10.phx.gbl... > I'm looking to write a program that operates at the lowest execution > priority possible. That is, I want the program to basically run in the > background having as little impact on the performance of computer > system > as > possible. The program will do some background backup tasks. > > I'm reasonably sure that the first step is to create a thread, and to > assign > the thread the lowest execution priority possible. Are there any other > techniques, advice, tricks, etc. that I should be aware of? Are there any > good examples or tutorials that anyone knows of? > > TIA, > > Richard Rosenheim > >
Thanks again.
Richard Rosenheim
"Willy Denoyette [MVP]" <wi*************@pandora.be> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Richard, No, just grap the CurrentProcess and set it's prioryty class to Idle.
... Process currentProcess = Process.GetCurrentProcess(); currentProcess.PriorityClass = ProcessPriorityClass.Idle; ...
Willy.
"Richard L Rosenheim" <ri*****@rlr.com> wrote in message news:OI**************@TK2MSFTNGP12.phx.gbl... Thanks for the reply. One other question -- is it possible (or even advisable) to set the priority of the actual program to idle, or must/should I spawn a separate thread in which I set that thread's priority to idle?
Richard Rosenheim
"Willy Denoyette [MVP]" <wi*************@pandora.be> wrote in message news:O8**************@TK2MSFTNGP11.phx.gbl... Just run your process with the ProcessPriorityClass.Idle.
Willy.
"Richard L Rosenheim" <ri*****@rlr.com> wrote in message news:e2*************@TK2MSFTNGP10.phx.gbl... > I'm looking to write a program that operates at the lowest execution > priority possible. That is, I want the program to basically run in
the > background having as little impact on the performance of computer > system > as > possible. The program will do some background backup tasks. > > I'm reasonably sure that the first step is to create a thread, and to > assign > the thread the lowest execution priority possible. Are there any
other > techniques, advice, tricks, etc. that I should be aware of? Are
there any > good examples or tutorials that anyone knows of? > > TIA, > > Richard Rosenheim > >
Priority setting for your current program mainthread
Threading.Thread.CurrentThread.Priority = Threading.ThreadPriority.Lowest
I hope this helps?
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: mark1822 |
last post by:
Hi,
I am trying to figure out if I should learn C and C++ to write CGI
programs, or if I should just use PHP for my web site.
I want to write a high traffic website that would call executibles...
|
by: Xah Lee |
last post by:
Jargons of Info Tech industry
(A Love of Jargons)
Xah Lee, 2002 Feb
People in the computing field like to spur the use of spurious jargons.
The less educated they are, the more they like...
|
by: Sohail |
last post by:
Hi all,
i am now to group this might be out of topic, if it is then please
tell me where i should ask this question...
At the time i am working on a project based on 8051, The project is so
get...
|
by: jay.dow |
last post by:
I want to write to the pins of an RS232 without using the serial
protocol. The use would be every pin could act to complete a circuit
in customized hardware. I could use python to communicate...
|
by: Xah Lee |
last post by:
i had the pleasure to read the PHP's manual today.
http://www.php.net/manual/en/
although Pretty Home Page is another criminal hack of the unix lineage,
but if we are here to judge the quality...
|
by: John Pote |
last post by:
Hello, help/advice appreciated.
Background:
I am writing some web scripts in python to receive small amounts of data
from remote sensors and store the data in a file. 50 to 100 bytes every 5 or...
|
by: Marco |
last post by:
FYI:
Guidelines for writing efficient C/C++ code
http://www.embedded.com/showArticle.jhtml?articleID=184417272
any comments?
|
by: maxvalery |
last post by:
Hi,
Here's a worthy challenge for ya'll. I'm trying to build a
questionnaire in php and need help understanding the logic behind the
process. Here's an example that explains everything:
1)...
|
by: Matt Kowalczyk |
last post by:
Hello,
I am working on a compression project and I want to write ASCII characters using
the minimum amount of bits. Since I will be writing ASCII characters from 0-127
I only need 7 bits to...
|
by: rmr531 |
last post by:
First of all I am very new to c++ so please bear with me. I am trying
to create a program that keeps an inventory of items. I am trying to
use a struct to store a product name, purchase price,...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |