Path: 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: Organization: University of Saskatchewan Lines: 38 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