Priority Setter

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I was wondering how to set a programs priority to high. I know that in
the task manager you can do this but i read somewhere there is a better
program. Also i would like a ram clearer.. or free'er .. one that
automatically does it and doesnt take a lot of cpu usage.


Re: Priority Setter

Quoted text here. Click to load it

Based on your question, I assume you are talking about Windows, and by the
way it is phrased, I'm pretty sure you don't want to do that.  Setting a
program's priority higher rarely makes it run faster, and can frequently
lock up the system.

Quoted text here. Click to load it

ummmm .... and why do you want your system to run slower?

You may want to learn a little more about demand paged operating systems.  I
get the feeling you are heading down the wrong path here.


Re: Priority Setter

yea i kinda figured because when i set my itunes on very high while
converting it locked up until it finished.

thanks anyway

Re: Priority Setter


Perhaps I shouldn't have been quite so terse.  Based on the Linux thread you
are clearly someone who is interested in learning.

Generally, the priority of tasks is set to manage dealing with certain
hardware that requires a response within a certain time.  When those tasks
miss their queue, bad things happen.  Without a pretty detailed
understanding of what is going on, making large priority adjustments
generally doesn't have the desired result.

Now, when you have several programs running, making small adjustments among
them can help get the sort of response you want, within some bounds.
Today's PC's, though, are blindingly fast, and generally giving a program
more of the CPU doesn't do much, since generally the program is waiting on
the disk.  Raising the priority of a disk-bound program doesn't help it any,
and may slow down other programs.  But if you have several compute-bound
programs running, lowering the priority of one can help the performance of

Memory is even less intuitive.  As you learned from the Linux thread, the
operating system uses disk as a slow substitute for memory.  Disk is more
than 1000 times slower than memory, so it is a very poor substitute.

Back in the Windows 3x days, you wanted to keep memory free because the
operating system worked differently, and for a program to be loaded, it
needed free memory.  To get that free memory, already used parts of memory
might need to be written to disk, which gets very slow.

In today's virtual memory, demand-paged operating systems, though, memory is
handled differently.  The operating system recognizes that certain memory
pages, called "pure" pages, exist exactly as they were on disk.  If a page
is pure, then then OS doesn't need to write it to re-use the memory.  The
operating system also keeps track of when each memory page was last used.
When you want to load a program (actually, programs don't get "loaded" in
the old sense, pages of the program "fault" into memory), but when you want
to load a progam, the OS looks for the piece of pure memory that was used
least recently.  The theory is that if you used a page recently, you are
more likely to use it again, so the oldest page is used to load the new
page, since that is the least likely to be needed again.

Well, if you think about it, this leads to an entirely different view of
memory.  If a page is already in memory, then I don't need to load it from
slow disk.  As a result, for the best performance, you should never free a
page of memory.  Any page of memory that is free is a page of memory that is
not being used to enhance performance, since what was on that page will now
need to be read from disk the next time it is needed, at a huge penalty in

Impure memory is treated somewhat differently.  Impure memory at some point
may need to get commited to disk, and if it's program has already exited, it
might make sense to free that page rather than keeping track of it.  But if
things get so busy that the only available pages are impure, then things
slow down trememdously because now pages need to be written to load new
pages.  Windows, in particular, tries hard to hang on to impure pages, which
is one of the things that makes backing up Windows such a pain.  As long as
Windows is running, the disk might not be in a consistent state since there
are probably lots of impure pages waiting to get written.  Linux doesn't
seem to have this problem, and backing up Linux doesn't seem to be the
minefield that backing up Windows is.  This is also why diskcheck ends up
running if you shut down the computer without going through the Windows
shutdown sequence.  The odds of the disk being corrupted are very high.

I hope this wasn't totally opaque.


Quoted text here. Click to load it

Re: Priority Setter

first of all thank you for the very long and explained response. The
last paragraph explained a lot to me. I think i am going to re-read
your response several times so i can get all of the information.

Thanks again

Site Timeline