Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool2.mu.edu!uunet!indetech!vsi1!zorch!xanthian From: xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) Newsgroups: comp.sys.amiga.advocacy Subject: How task priorities get changed from the Amiga CLI Re: How do we change the scheduler? (Was Re: Multitasking at home...) Message-ID: <1991Jan23.144310.18737@zorch.SF-Bay.ORG> Date: 23 Jan 91 14:43:10 GMT References: <10620.tnews@templar.actrix.gen.nz> <1991Jan22.215801.4557@Neon.Stanford.EDU> Organization: SF-Bay Public-Access Unix Lines: 37 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.