xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) (01/23/91)
torrie@cs.stanford.edu (Evan J Torrie) writes: >jbickers@templar.actrix.gen.nz (John Bickers) writes: > A number of programs display some intelligence about what priority > to use automatically (like editors that edit at priority 1, or > executable packers that crunch at priority -1, etc). And some can > be configured. "Some" can be configured? Is there an all-purpose "nice" command? Not by that name, but, for example, I want my terminal emulator, which also handles downloads and uploads for me, to run at a higher priority (most of the time it is just waiting for keystrokes from me and using no cpu time, so a higher priority is OK, and I do need the higher priority to keep the download from missing characters when I _am_ running a download). So, I start my "vt100" program up with a script called "dovt100", that looks like this: changetaskpri 3 ; bump the priority of all subsequent tasks run vt100 ; spawn a terminal emulator at higher priority changetaskpri 0 ; return subsequently spawned task's priority to ; normal there's no reason in the world except saving keystrokes that I use a script, but you can see the mechanism, I hope. You can also change a task's priority while it is running, by using the "ps" command to learn its process ID, then using another form of the priority changing routine that uses that process ID: changetaskpri 3 process 2 and only affects the one process instead of all of them. Kent, the man from xanth. <xanthian@Zorch.SF-Bay.ORG> <xanthian@well.sf.ca.us>