🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2604

Re: Raising a process's priority

#2604
From: Kevin Lowey
Date: Sat, 04 May 1991 22:57
38 lines
2192 bytes
hwb@nadia.stgt.sub.org (Harald Boegeholz):

> I have a question about raising a process's priority. On my machine,
> I run an OS/2-Version of UUPC/extended to transfer news and mail.
> To optimize throughput, I have raised the process priority to
> PRTYC_FOREGROUNDSERVER using DosSetPrty.
> 
> What I want to achive is this: the modem process should not be delayed
> when I continue using the system interactively. Since OS/2 uses
> dynamic priorities, the active window always gets a higher priority
> than the other windows. A simple command like a directory listing
> takes up almost all cpu time (scrolling in graphics mode keeps the
> machine busy).

There are better ways to fix this than to hard code it into the program. 
I suggest adding this line to CONFIG.SYS:

PRIORITY=ABSOLUTE

This disables the dynamic priorities and instead leaves everything at their
default base priorities all the time.  This lets background tasks get a 
higher percentage of the CPU than with dynamic priorities.

If you want to leave the dymanic option on, you can change the MAXWAIT 
option in CONFIG.SYS.  This controls the maximum amount of time a process
must wait before it's priority is dynamically increased.  A shorter time 
ensures that a process will get control back sooner when dynamic priorities
are set.
 
You may also want to change the TIMESLICE option in CONFIG.SYS.  TIMESLICE 
controls the minimum and maximum amount of CPU time a process gets before it 
is forced to give up the CPU.  The default is about 250 milliseconds maximum.
Communications programs work a bit better if the maximum is reduced to 
about 100 milliseconds.

See your OS/2 manuals, or the on-line command reference for more details.

- Kevin Lowey  
Technical Details
Message-ID: <1991May4.225758.14413@herald.usask.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!atha!aunro!alberta!herald.usask.ca!lowey
References: <W8KQ6DO@nadia.stgt.sub.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!atha!aunro!alberta!herald.usask.ca!lowey
From: lowey@herald.usask.ca (Kevin Lowey)
Newsgroups: comp.os.os2.programmer
Subject: Re: Raising a process's priority
Message-ID: <1991May4.225758.14413@herald.usask.ca>
Date: 4 May 91 22:57:58 GMT
References: <W8KQ6DO@nadia.stgt.sub.org>
Organization: University of Saskatchewan
Lines: 38