Process priorities and X

Gary Bridgewater gary at dgcad.SV.DG.COM
Fri Jul 6 18:51:56 AEST 1990


In article <1990Jul4.160042.562 at smsc.sony.com> dce at Sony.COM (David Elliott) writes:
}In article <1990Jul4.061431.12129 at servalan.uucp> rmtodd at servalan.uucp (Richard Todd) writes:
}}... and I've noticed that clients that are started from twm (by some
}}twm menu action) are niced down by 4, and clients that are started by hand
}}run at normal niceness.  
}This makes sense.  All twm does is to system() the command to be
}executed, so it is subject to the same rules as any command executed
}by /bin/sh.
}In System V.2 and better versions of sh, the default is to automatically
}nice down (by 4) all processes started in the background.

(X11R3 uwm has the same property)

I just invoke the following set-root script from my initializer script.  If the
window manager is a nice -4 then sons exec'd with a nice 4 will have a net
niceness of 0.  Friendly system managers can set this up for users.  Substitute
the windowmanager of your choice or make it an argument.  Probably everyone can
make a better one than this but it works for me on my AViiON.
(Note: having a nice -4 window manager makes it quite snappy.)

//
#!/bin/sh
# raise window manager priority
exec renice -4 `ps -e | grep uwm | cut -c1-6` >> /dev/null 2>&1
-- 
Gary Bridgewater, Data General Corporation, Sunnyvale California
gary at sv.dg.com or {amdahl,aeras,amdcad}!dgcad!gary
C++ - it's the right thing to do.



More information about the Comp.unix.questions mailing list