Xref: utzoo comp.unix.xenix:4638 comp.unix.wizards:14334 Path: utzoo!attcan!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.unix.xenix,comp.unix.wizards Subject: Re: Changing the nice() value of a running process. Keywords: Can someone explain why? Message-ID: <933@philmds.UUCP> Date: 25 Jan 89 18:13:01 GMT References: <363@lilink.UUCP> <8818@alice.UUCP> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 27 In article <8818@alice.UUCP> debra@alice.UUCP () writes: [] |If all processes run at the same lowered priority the scheduling should |remain the same. What you did however had 2 effects: |1) The database program runs at a lower priority than your user interface | which means that the user interface will respond better. This explains | why the cursor is no longer hesitating. |2) It looks like you are running the program from a shell script. The | "nice" command is not build in (in the bourne shell), which means you | are now invoking twice as many processes, which aren't doing much, but | the nice process sits waiting for the database program to finish. If nice was implemented to wait for a child to terminate, this would be the case. But this wouldn't be a nice implementation of nice (8-), since all it has to do is lower the priority, then execve() its own (shifted) arguments. On Ultrix: $ nice -10 ps gx PID TT STAT TIME COMMAND 4766 ia TW 0:43 rn 5914 ia R N 0:01 ps gx 17932 ia S 0:18 esh $ No sign of a waiting nice process... Leo.