RE: Fixing Priority

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lalit,

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.

Thanks,
Lyle


-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of Lalit Seth
Sent: Thursday, November 04, 2004 12:35 AM
To: gcc-help@xxxxxxxxxxx
Subject: Fixing Priority

Hi,

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.

Why?

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
Daemon?

Many Thanks

_________________________________________________________________
Mergers, takeovers, buyouts. Get all the latest biz bytes. 
http://www.msn.co.in/business/ Tune in to MSN Business!



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux