Article View: comp.os.os2.programmer
Article #2603Raising a process's priority
From: Harald Boegeholz
Date: Fri, 03 May 1991 23:19
Date: Fri, 03 May 1991 23:19
48 lines
2434 bytes
2434 bytes
Hello, everybody!
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).
For my modem process, I want a priority slightly higher than that
of a foreground window, and I thought PRTYC_FOREGROUNDSERVER was
the right priority to achieve that.
One thing I don't understand: The PSTAT command seems to display
the priorities using a different (more internal?) coding than
DosGet/SetPrty. In this display, regular processes have a high
order byte of 2, my PRTY_FOREGROUNDSERVER process has 3, and the
CMD process of the active window has 4. Even more strangely, the
PSTAT command executing under that CMD has 031F, which is still higher
than my 0300. Values of the high order byte seem to range up to 8
here, which DosGetPrty reports as 3 (time critical).
Also, the DOS box seems to get a higher priority, too (which I can't
verify without leaving it :-( ).
Is there a way of setting process priority on a finer scale, say, to
5 in the internal coding used by PSTAT?
Or do I have to resort to PRTYC_TIMECRITICAL? Are there any objections
against using such a high priority in a user process?
Btw, the above applies to OS/2 1.3. Under OS/2 1.2 it seems to be pretty
much the same. Except that the PSTAT process runs at 071F.
Strange.
Somebody please enlighten me!
Harald
--
Harald Boegeholz |Home: hwb@texnix.stgt.sub.org (read daily)
|University: boegehol@az3.informatik.uni-stuttgart.de
|please don't send large (>100k) mail to my home address.
Technical Details
Message-ID:
<W8KQ6DO@nadia.stgt.sub.org>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!math.fu-berlin.de!ira.uka.de!smurf!nadia!hwbShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!math.fu-berlin.de!ira.uka.de!smurf!nadia!hwb From: hwb@nadia.stgt.sub.org (Harald Boegeholz) Newsgroups: comp.os.os2.programmer Subject: Raising a process's priority Message-ID: <W8KQ6DO@nadia.stgt.sub.org> Date: 3 May 91 23:19:29 GMT Organization: Stuttgart Net Systems, FRG Lines: 48