Fixing Priority
Thu Nov 4 17:59:00 GMT 2004


A process's priority is constantly changing based on its nice value and
how much CPU time it's had or how long it's been since it was given CPU
time.  It's how the scheduler decides what process to schedule next on
the CPU.  The longer the process hasn't had CPU time, the higher its
priority will become.  Once its priority gets high enough, the scheduler
will give it some CPU time.  The longer it has been running on the CPU,
the lower its priority will become, until it gets low enough for
something else to have a higher priority at which point it will get
moved off the CPU in favor of the other process.


-----Original Message-----
From: [] On
Behalf Of Lalit Seth
Sent: Thursday, November 04, 2004 12:35 AM
Subject: Fixing Priority


I am having a Multi-Threaded Daemon running on HPUX 11.11 using GCC.

I can see in 'top' that its PRIORITY is somewhere near 236-255 with NICE
vlaue at 20.

There are other process running at priorities at 154, 156 but my daemon
always remain at top of the list.


Also i witnesssed that after few minutes of execution the PRIORITY is
changed to 152.
Why does it change from 242/255 to 152?

Is there any system call through which i can FIX the Priority for my

Many Thanks

Mergers, takeovers, buyouts. Get all the latest biz bytes. Tune in to MSN Business!

More information about the Gcc-help mailing list