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 1894
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: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |