public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* How does the windows specific aspects of nice work?
@ 2003-09-30 17:25 Jason House
  2003-09-30 17:42 ` Igor Pechtchanski
  0 siblings, 1 reply; 3+ messages in thread
From: Jason House @ 2003-09-30 17:25 UTC (permalink / raw)
  To: cygwin

I did a search online and found the following message (but no reply to 
it).  Does anyone know the particulars about nice?  If it still works as 
they describe (with 2 non-normal priorities), does anyone know when it 
will allow the full range of window supported priorities?


     * From: "Thomas Chadwick" <j_tetazoo at hotmail dot com>
     * To: cygwin at cygwin dot com
     * Date: Mon, 06 Jan 2003 14:44:37 -0500
     * Subject: nice command?
     * Bcc:

I got to playing around with Windows 2000 Task Manager the other day and 
discovered that you can change the priority of a running task. This led 
me to discover that you can specify the priority of a task when you 
launch it by way of the windows start command using one of the following 
options:

LOW Start application in the IDLE priority class
NORMAL Start application in the NORMAL priority class
HIGH Start application in the HIGH priority class
REALTIME Start application in the REALTIME priority class
ABOVENORMAL Start application in the ABOVENORMAL priority class
BELOWNORMAL Start application in the BELOWNORMAL priority class
WAIT Start application and wait for it to terminate

I then got to playing with nice (under Cygwin) to see what I could do 
about setting the priority of a Cygwin task. I used the following syntax 
and tried a number of values of x:

nice -n x programname.exe

I found that specify a value of x=0 results in NORMAL priority. For any 
value of x > 0, I found I got a priority of LOW. For any value of x < 0, 
I found I got a priority of HIGH.

I tried "man nice" and "info nice" and got scant documentation. I'm just 
curious if this is the expected behavior of nice? Is my analysis 
correct, or are there other values of "x" that will get me the other 
Windows priorities? FWIW, there's a Cygwin task I'd like to launch with 
AboveNormal priority.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How does the windows specific aspects of nice work?
  2003-09-30 17:25 How does the windows specific aspects of nice work? Jason House
@ 2003-09-30 17:42 ` Igor Pechtchanski
  2003-09-30 17:48   ` Igor Pechtchanski
  0 siblings, 1 reply; 3+ messages in thread
From: Igor Pechtchanski @ 2003-09-30 17:42 UTC (permalink / raw)
  To: Jason House; +Cc: cygwin

On Tue, 30 Sep 2003, Jason House wrote:

> I did a search online and found the following message (but no reply to
> it).  Does anyone know the particulars about nice?  If it still works as
> they describe (with 2 non-normal priorities), does anyone know when it
> will allow the full range of window supported priorities?
>
>      * From: "Thomas Chadwick" <j_tetazoo at hotmail dot com>
>      * To: cygwin at cygwin dot com
>      * Date: Mon, 06 Jan 2003 14:44:37 -0500
>      * Subject: nice command?
>      * Bcc:
>
> I got to playing around with Windows 2000 Task Manager the other day and
> discovered that you can change the priority of a running task. This led
> me to discover that you can specify the priority of a task when you
> launch it by way of the windows start command using one of the following
> options:
>
> LOW Start application in the IDLE priority class
> NORMAL Start application in the NORMAL priority class
> HIGH Start application in the HIGH priority class
> REALTIME Start application in the REALTIME priority class
> ABOVENORMAL Start application in the ABOVENORMAL priority class
> BELOWNORMAL Start application in the BELOWNORMAL priority class
> WAIT Start application and wait for it to terminate
>
> I then got to playing with nice (under Cygwin) to see what I could do
> about setting the priority of a Cygwin task. I used the following syntax
> and tried a number of values of x:
>
> nice -n x programname.exe
>
> I found that specify a value of x=0 results in NORMAL priority. For any
> value of x > 0, I found I got a priority of LOW. For any value of x < 0,
> I found I got a priority of HIGH.
>
> I tried "man nice" and "info nice" and got scant documentation. I'm just
> curious if this is the expected behavior of nice? Is my analysis
> correct, or are there other values of "x" that will get me the other
> Windows priorities? FWIW, there's a Cygwin task I'd like to launch with
> AboveNormal priority.

I suspect it's a <http://cygwin.com/acronyms/#PTC> situation...  The
implementation of the "nice()" syscall simply doesn't know about the
AboveNormal priority value (see winsup/cygwin/syscalls.cc:2512).  There is
a more fine-grained control mechanism in the "sched_setparam()" Cygwin API
call, but the "nice" program doesn't use it.
	Igor
P.S. Another thing that's missing is a "renice" program.  Also PTC.
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How does the windows specific aspects of nice work?
  2003-09-30 17:42 ` Igor Pechtchanski
@ 2003-09-30 17:48   ` Igor Pechtchanski
  0 siblings, 0 replies; 3+ messages in thread
From: Igor Pechtchanski @ 2003-09-30 17:48 UTC (permalink / raw)
  To: cygwin; +Cc: Jason House

On Tue, 30 Sep 2003, Igor Pechtchanski wrote:

> On Tue, 30 Sep 2003, Jason House wrote:
>
> > I did a search online and found the following message (but no reply to
> > it).  Does anyone know the particulars about nice?  If it still works as
> > they describe (with 2 non-normal priorities), does anyone know when it
> > will allow the full range of window supported priorities?
> >
> >      * From: "Thomas Chadwick" <j_tetazoo at hotmail dot com>
> >      * To: cygwin at cygwin dot com
> >      * Date: Mon, 06 Jan 2003 14:44:37 -0500
> >      * Subject: nice command?
> >      * Bcc:
> >
> > I got to playing around with Windows 2000 Task Manager the other day and
> > discovered that you can change the priority of a running task. This led
> > me to discover that you can specify the priority of a task when you
> > launch it by way of the windows start command using one of the following
> > options:
> >
> > LOW Start application in the IDLE priority class
> > NORMAL Start application in the NORMAL priority class
> > HIGH Start application in the HIGH priority class
> > REALTIME Start application in the REALTIME priority class
> > ABOVENORMAL Start application in the ABOVENORMAL priority class
> > BELOWNORMAL Start application in the BELOWNORMAL priority class
> > WAIT Start application and wait for it to terminate
> >
> > I then got to playing with nice (under Cygwin) to see what I could do
> > about setting the priority of a Cygwin task. I used the following syntax
> > and tried a number of values of x:
> >
> > nice -n x programname.exe
> >
> > I found that specify a value of x=0 results in NORMAL priority. For any
> > value of x > 0, I found I got a priority of LOW. For any value of x < 0,
> > I found I got a priority of HIGH.
> >
> > I tried "man nice" and "info nice" and got scant documentation. I'm just
> > curious if this is the expected behavior of nice? Is my analysis
> > correct, or are there other values of "x" that will get me the other
> > Windows priorities? FWIW, there's a Cygwin task I'd like to launch with
> > AboveNormal priority.
>
> I suspect it's a <http://cygwin.com/acronyms/#PTC> situation...  The
> implementation of the "nice()" syscall simply doesn't know about the
> AboveNormal priority value (see winsup/cygwin/syscalls.cc:2512).  There is
> a more fine-grained control mechanism in the "sched_setparam()" Cygwin API
> call, but the "nice" program doesn't use it.
>         Igor
> P.S. Another thing that's missing is a "renice" program.  Also PTC.

Oh, and this is relevant too:
<http://cygwin.com/cygwin-api/std-misc.html#AEN115>.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-30 17:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-30 17:25 How does the windows specific aspects of nice work? Jason House
2003-09-30 17:42 ` Igor Pechtchanski
2003-09-30 17:48   ` Igor Pechtchanski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).